Zend Framework | Sharing DB-connection between Controllers
Posted: Wed Jul 18, 2007 10:24 pm
Hi,
I'm just learning how to develop web applications using Zend Framework.
In a procedural PHP program, I usually establish the DB connection in prepend.inc.php.
Other scripts, have a include statement which enables them to use this connection,
and since the program runs from top to down, everything goes fine.
But I've troubles with ZF, I wonder how can I share a DB-connection between different Controllers
in Zend Framework? There are View and Controller for Model-View-Controller in ZF.
But where's the Model?
I'm just learning how to develop web applications using Zend Framework.
In a procedural PHP program, I usually establish the DB connection in prepend.inc.php.
Other scripts, have a include statement which enables them to use this connection,
and since the program runs from top to down, everything goes fine.
But I've troubles with ZF, I wonder how can I share a DB-connection between different Controllers
in Zend Framework? There are View and Controller for Model-View-Controller in ZF.
But where's the Model?