Adding a custom resource type to the Zend Framework autoloader

PHP, Zend Framework
Because I can never remember how to do this and because it's not that easy to find on google I have copied the info here. If you want to add a folder to the application directory and then have classes within that directory autoload, for instance you add a folder 'objects' (application/systems) that contain classes like Application_System_One. This would work for any Application_ classes and its exactly what the Zend Framework autoloader does when it inits the default resorces like application forms, models, services etc. Here's what you need to do: Full credit goes to http://pietervogelaar.nl/ for this copy and paste. This week I wanted to created the folder "application/grids/" to store my grids in. For example the path to the grid is "application/grids/Product.php". The code inside this PHP file:…
Read More