title: How do I Access my Models using a Daemon in Zend Framework
body: <p>I am working on a project that is using <a href="https://github.com/fennb/phirehose/" rel="nofollow">Phirehose</a> to collect and consume the Twitter Streaming API. The Phirehose library is designed to be run from the command line, preferably as a daemon or cron job.</p>
  
  <p>I created a daemon and placed it in the library folder. Bootstrap.php has been updated to autoload the custom library. So, the application itself has no problem seeing my daemon.</p>
  
  <p>My issue is how to integrate it properly with Zend Framework. I need to be able to call the daemon file directly to start it from the command line or using a tool such as <a href="http://upstart.ubuntu.com/" rel="nofollow">Upstart</a>, but in doing so the Zend application doesn't load which means I don't have access to my models. </p>
  
  <p>I could create a controller to start it, but I don't want to add the security issue of somebody being able to control the daemon from a web interface. I could also write the PDO to manually connect to the database, but I'm trying to avoid it for scaling reasons. I'd prefer all database connection data reside in application.ini.</p>
  
  <p>Is there a way, within my daemon class, to initialize my Zend Framework application so I can use the models? </p>