How to install PEAR (Linux)
PEAR (PHP Extension and Application Repository) is a bunch of extensions you can install on your server to uitilise clever ‘extras’ that other people have spent their time writing. To…
A bunch of ramblings about PHP programming, JQuery, MySQL and other 'stuff'
PEAR (PHP Extension and Application Repository) is a bunch of extensions you can install on your server to uitilise clever ‘extras’ that other people have spent their time writing. To…
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',…
I was just playing around with PHP’s ability to create compressed files, and I had a problem. My ZIP file was not getting created but I wasn’t getting any errors.…
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.…
Was getting the above error in my Doctrine project, turned out I had used a single quote in the ORM Annotations: /** * @ORM\Column(type='integer', name='row_number') * @var int */ protected…
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…
Think: “What am I testing?” 1) Set-up Instantiate your class Look for dependencies, are there any that need mocking? 2) Exercise We test our real objects that need testing, or…
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…