(on Friday, 04 September 2009, 07:20 AM -0700):
> Hi. What's the best way to retrieve a resourse in the bootstrap ? $this->
> bootstrap('db'); $resource = $this->getResource('db'); or $resource =
> $bootstrap->getPluginResource('db'); Thanks in advance. Bye
The first:
$this->bootstrap('db');
$db = $this->getResource('db');
getPluginResource() returns the actual resource plugin object -- and
clearly won't work for class-based resources -- while getResource()
returns whatever was generated when running a given resource.
--
Matthew Weier O'Phinney
Project Lead | matthew@zend.com
Zend Framework | http://framework.zend.com/
没有评论:
发表评论