I'm new to ZF and I'm trying to figure out the difference between resource
and plugin resource - specifically, I have a working site and in the
bootstrap I init the doctype with this:
public function _initDocType(){
$this->bootstrap('view');
$view = $this->getResource('view');
$view->doctype('XHTML1_STRICT');
}
And I init the registry with this:
public function _initRegistry()
{
$this->bootstrap('db');
$resource = $this->getPluginResource('db');
$db = $resource->getDbAdapter();
Zend_Registry::set('db', $db);
}
My question is, why do I need to use getResource for the 'view' BUT
getPluginResource for the 'db'? Both seem to be defined in my
application.ini:
...
resources.view =
...
resources.db.adapter = PDO_MYSQL
resources.db.params.host = localhost
resources.db.params.username = xxxx
resources.db.params.dbname = xxxxxxx
resources.db.params.password = xxxxxxx
...
Thanks!
--
View this message in context:
http://www.nabble.com/resource-vs.-pluginresource-tp26082067p26082067.html
Sent from the Zend Framework mailing list archive at Nabble.com.