Jack Sleight wrote:
I solve this by creating an ApplicationController which extends
Zend_Controller_Action, and then all my other controllers extend that.
Just make sure to include the file, because ZF wont include it
automatically.
Thats what I was thinking of doing , sorry I didnt add that, so thats an
ok design concept then or a hack heh.
Other frameworks ive seen have page controllers which is able to extend
a core class. Its a similar concept to how i built my own light php4
framework but it uses methods depending on the request method, and its
core -> project -> page
So core does the stuff like setting up database connections, configs,
error handling, and common methods used, project has common methods for
a specific application ie one for instance is a method to initiate a
PEAR datagrid for an admin application which is then reusable across
page classes so the code isnt constantly rewritten as it has a few
methods to init first.
Sorry about these questions, Ive decided to choose Zend because it seems
more common to the PEAR project standard as my stuff is heavily built on
PEAR, the others ive checked out seem bloated, vaporware or rogue and I
will still use quite alot of packages ie the datagrid and paging and
some of the other PHP5 based ones. So yes im migrating my framework to
this one, maybe this things are best initiated as classes in a custom
library from the controllers ?