calbear77 wrote:
> 
> I figure I need to access the entity manager that I've created using a
> class that extends Zend_Application_Resource_ResourceAbstract, and in
> order to do that, I figure I need to access the bootstrap so that I can
> find my doctrine resource.  The only problem is that when I get an
> instance of the FrontController, it doesn't contain the bootstrap (i.e. a
> call to "$front->getParam('bootstrap');" returns null).  
> 

If you are in a descendant of Zend_Application_Resource_ResourceAbstract, in
order to grab the bootstrap you can do:

$bootstrap = $this->getBootstrap();

NOTE: This works because the getBootstrap() method is defined on line 155 of
Zend/Application/Resource/ResourceAbstract.php.

When a class extends another, it inherits the methods of the super-class
which means we can access those methods (assuming the access is public or
protected) using $this->nameOfMethod().

Please forgive me if you knew this and just didn't think about it; however,
I included it in case you didn't.

I hope it works out for you.





-----
--
Wil Moore III

Why is Bottom-posting better than Top-posting:
http://www.caliburn.nl/topposting.html

DO NOT TOP-POST and DO trim your replies:
http://linux.sgms-centre.com/misc/netiquette.php#toppost
-- 
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Accessing-Bootstrap-within-Session-Save-Handler-class-tp3208482p3209568.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to