Hello All,

As I am always trying to make sure I am getting the most out of ZF. I am
working on a new personal project and wanted to do it with a skeleton
produced by Zend_Tool. In my production projects built back at 1.7 and some
lower. I had a directory App/ inside my library/ folder. It had a
Controller.php

    <?php
    class App_Controller extends Zend_Controller_Action
    {
       protected $_redirector;
       protected $_flashMessenger = null;

       public function init()
       {
          parent::init();
          $this->_flashMessenger    =
$this->_helper->getHelper('FlashMessenger');
          $this->_redirector = $this->_helper->getHelper('Redirector');
          $this->initView();
       }

       protected function flash($message,$to)
       {
          $this->_flashMessenger->addMessage($message);
          $this->_redirector->gotoUrl($to);
       }

       protected function setMessages()
       {
          $this->view->messages =
join("",$this->_flashMessenger->getMessages());
       }
        public function postDispatch()
       {
          $this->setMessages();
          parent::postDispatch();
       }

    }

This was mainly to handle messages with flashmessenger. Well I thought I
added everything correctly but my new project Fatal Errors with:
Fatal error: Call to a member function getMessages() on a non-object in
/home/swingco/library/App/Controller.php on line 22

which is the setMessages() function. Did I forget something or do I need to
do something different to load the view Helper??? This Controller.php is
still running fine on 10 production sites right now so I know it has to be
something in my config or Bootstrap

Thx for any pointers
Eric
-- 
View this message in context: 
http://www.nabble.com/App-Controller.php-and-ZF-1.8-Bootstrap-tp24455220p24455220.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to