Add a path to the PHP include path
I recently wanted to add a Zend library to a project without adding the entire framework. I found that internally, the Zend application requires the Library path to be in…
A bunch of ramblings about PHP programming, JQuery, MySQL and other 'stuff'
I recently wanted to add a Zend library to a project without adding the entire framework. I found that internally, the Zend application requires the Library path to be in…
The Zend Validator error messages are not the most helpful. Considor the below code for creating a file input: $this->addElement('file', 'signature', array( 'validators' => array( array('Size', false, 20480), //20k array('Extension',…
If using Netbeans for your development and you have a horrendous spagetti coded “if” statement, you can use a keyboard shortcut to go to the matching opening or closing bracket.…
When using an inline partial viewscript in my form, I sometimes need access to data. I can accomplish this by using a setter and getter with a public function in…
Have had some serious problems getting this working, but after a 4 hour head bashing session, we’ve cracked it. CREATE TABLE inventory( inventory_id INT AUTO_INCREMENT, discriminator_column VARCHAR(20), category VARCHAR(50) NOT…
When creating a Zend Framework site, its always best to keep the Zend library as an external source. This way you can keep the branch up-to-date with the release of…
To pass data from your controller, to a Zend_Form, you can utilise the config parameters: $this->view->form = new Contact_Edit_Form(array('contactName' => 'Chris')); This will pass a very simple array to the…
When using a CLI script with options, I like to use the Zend_Console. If my options are as follows: $console = new Zend_Console_Getopt( array( 'i-s' => 'test option 1', 'e'…