zend-framework

Unable to Access Zend Server 5 CE after installation

I have previously installed WAMP on my windows, and now I am trying to install Zend Server 5 CE 5.3.1 Win x86. During the installation of Zend Server, there is a step asking about: web server port : 80 zend server interface port : 10081 I kept to the default. After the installation, I tried to access http://localhost,and is able to ...

dojo.xhrPost and Zend Framwork action, no POST data, not using a form

Hi all, I'm trying to send some data via dojo.xhrPost to an Zend Controller Action. I can see the data being sent in Firebug console. However, when inspecting the post data, the array is empty. I'm not sure if it is possible to send an arbitrary string of data via dojo.xhrPost without using a form. This is probably a very n00b mistake. ...

How to convert different local float format to standard float format, using zend?

my local is 'en_IN' (ie Zend_Registry::get('Zend_Locale')) I have to convert the local value to standard float number format for example 1,235.23 => 1235.23 3.23 => 3.23 I have used the following code Zend_Locale_Format::getFloat($value, array('locale' => Zend_Registry::get('Zend_Locale'))); it working fine for 1,235.23, and i ge...

PHP Fatal error, trying to request method inside model multiple times

The error message [23-Mar-2010 08:36:16] PHP Fatal error: Cannot redeclare humanize() (previously declared in /Users/tmclssns/Sites/nadar/nadar/trunk/webapp/application/filer/models/Filer/Aggregate.php:133) in /Users/tmclssns/Sites/nadar/nadar/trunk/webapp/application/filer/models/Filer/Aggregate.php on line 133 I have ...

Zend Form Element Decorator

How to prepend the label of checkbox element through decorator? ...

Zend_Test_PHPUnit_ControllerTestCase: Test view parameters and not rendered output

Hi, I'm using Zend_Test_PHPUnit_ControllerTestCase to test my controllers. This class provides various ways to test the rendered output, but I don't want to get my view scripts involved. I'd like to test my view's vars. Is there a way to access to the controllers view object? Here is an example, what I'm trying to do: <?php class Contr...

How can I integrate FCKeditor in a Zend Framework application?

I've seen there are questions here about how to integrate scripts in ZF. There are also some questions about FCKEditor. But I have found nothing about both ZF and FCKEditor. Does anyone use FCKEditor with ZF? Alternatively...is there an RTE which can integrate well with ZF? Thank you ...

A PHP design pattern for the model part [PHP Zend Framework]

I have a PHP MVC application using Zend Framework. As presented in the quickstart, I use 3 layers for the model part : Model (business logic) Data mapper Table data gateway (or data access object, i.e. one class per SQL table) The model is UML designed and totally independent of the DB. My problem is : I can't have multiple instance...

Zend Form: add error message after form validation

How to add an error message to Zend Form element after the form was already validated? I'm trying to add error mesages I get from Zend_Auth (now I'm displaying them using flashMessenger). I tried something like this: $form->getElement('username')->addErrorMessage('my message'); ...

What is the autoload class names structure, for the root "library" dir in a Zend Framework 1.10.2 project?

I have a project I created with Zend Framework 1.10.2. I usually use the application/models directory for new model files I create, and the auto loading is fine, so for example - My_Model_SampleClass is located application/models/SampleClass.php. However, I have just created a custom Exception class, and it does not fit in the mode...

Zend: .htaccess is not working on windows now how to continue my project?

I started working on a project in the mid. We are using Zend Framework, PHP, MySql, Ajax, jQuery and jSon on Ubuntu. It was working on ubuntu. Now I switched to Windows. I installed Wamp, Eclipse and create a host(test.dev) on windows for my project. But when start the project by test.dev. it give me the following error on browser windo...

Taking the data mapper approach in Zend Framework

Let's assume the following tables setup for a Zend Framework app. user (id) groups (id) groups_users (id, user_id, group_id, join_date) I took the Data Mapper approach to models which basically gives me: Model_User, Model_UsersMapper, Model_DbTable_Users Model_Group, Model_GroupsMapper, Model_DbTable_Groups Model_GroupUser, Model_Gr...

Zend: Why form elements are not rendered correctly in windows? It was working on ubuntu.

I was working with Zend on Ubuntu and it was working correctly. Now I moved to windows for same project. But now elements of my form are not rendered correctly and their code is appeared on brower's page like this: translate( $this->element->getElement("email")->getLabel() ) ?> Any idea that what is the problem? ...

Developing Mobile App (Iphone,Blackberry,Android) for an existing website

Hey Guys I have a website and am planning to develop a mobile version of it for the iphone, blackberry and android. My website is a social network built on PHP Zend framework. Now all these mobile apps are going to be having the same functionality like the website. I am little ignorant about this - but from a high level I understand t...

Zend Framework: disable autoloading of base model tables

I use Module Autoloader to autoload resources (forms, Doctrine models etc.). I do not use Zend_Db_Table at all. When I load any Doctrine model, e.g. MyModule_Model_Test, it tries to load MyModule_Model_TestTable too, so I get errors that the MyModule_Model_TestTable.php is missing. To fix this, I may create empty class MyModule_Model_...

Best way to deal with session handling in Zend Framework

So I'm starting up in Zend framework and looking to implement a site-wide "User" session.... something I can easily access from ALL modules/controllers in the application. I'm like, should I make a new namespace in the library and extend the controller, like: class MYCUSTOMLIB_Controller_Action extends Zend_Controller_Action { prot...

Problem in getting week number of sundays , in zend

I want to get the week number of a particular date , using Zend_Date My local is setted as English(IN) [en_IN], in Opera browser I am using the following code $date = new Zend_Date('22 Mar, 2010', null, Zend_Registry::get('Zend_Locale')); echo $date->get(Zend_Date::WEEK); //output 12, correct But if we give a sunday , it will not wo...

How can I modify the error message for the required / notempty validator in the ini file

I'ld like to configure my forms using config with an ini file. I need individualized error messages like the following one: suche.elements.methode.options.validators.strlen.options.messages.stringLengthTooLong = "Der Suchbegriff '%value%' ist zu lang!" This works well for strlen and regex, but how do I set it up for "required" element...

Zend_Form MultiCheckbox not checking boxes

$groups = Model_UserGroup::load_links($object->id); foreach ($groups as $item) { $object->group[$item->group_id] = $item->enabled; } $array_object = (array) $object;//turn the object to an array so zend_form can use it $form->populate($array_object); enabled = 1 or 0 In the form class: $group = new Zend_Form...

How to integrate Doctrine 2 (alpha release) and Zend Framework

Hi, I want to integrate doctrine 2 with zend framework 1.9. Please give me some link or some tutorial to integrate doctrine 2. I have worked doctrine 1.1. But now I want to integrate doctrine 2. I think which have some different approach to add doctrine 2. Thanks Raju Mazumder ...