Zend framework

Create hidden zf form element and add validator for unsigned float field

Create hidden zf form element
Default hidden element created by zend_form are often come up with its (probably unwelcoming) decorators, eg. its wrappers outside. Those wrappers could break the layout by adding in unnecessary blank lines.
To avoid this, just use the function addDecorators to add a displayNone class name to the element's wrappers:

English

Confirm password with customized error message using zend_form

Below was my first version of password and confirm password form inputs.

$password = $this->createElement('password','password');
$password->setLabel('Password: *')
->addValidator('StringLength', false, array(6, 60))
->setRequired(true);
$confirmPassword->setLabel('Confirm Password: *')
->addValidator("identical" , true, array('password' ))
->setRequired(true);

English

Using a helper to autoload inline (javascript file) based on the controller name and action name in Zend Framework

mkdir application/views/helpers/ -p && touch application/views/helpers/LoadInlineJs.php

Vim LoadInlineJs.php, and type in follow code:

English

Set favicon for Zend Framework

I think below is the decent/ZF way to do it:

English

Testing Note: PHPUnit was not found in your include_path, therefore no testing actions will be created.

When I was to create a zend framework project with following command in squeeze:

../ZendFramework-1.11.7/bin/zf.sh create project quickstart

I got this 'error' hint:

Testing Note: PHPUnit was not found in your include_path, therefore no testing actions will be created.

I do not like the error while I do like & want the phpunit, so I fired a search to find out whether the phpunit being installed on my server:

English
Subscribe to RSS - Zend framework