Title.php

Go to the documentation of this file.
00001 <?php
00002 
00035 class Robo47_Controller_Plugin_Title extends Zend_Controller_Plugin_Abstract
00036 {
00037 
00043     protected $_append = '';
00049     protected $_prepend = '';
00055     protected $_view;
00056 
00063     public function __construct(Zend_View_Interface $view,
00064         $append = '',
00065         $prepend = '')
00066     {
00067         $this->setAppend($append);
00068         $this->setPrepend($prepend);
00069         $this->setView($view);
00070     }
00071 
00077     public function getView()
00078     {
00079         return $this->_view;
00080     }
00081 
00088     public function setView(Zend_View_Interface $view)
00089     {
00090         $this->_view = $view;
00091         return $this;
00092     }
00093 
00100     public function setAppend($value = null)
00101     {
00102         $this->_append = $value;
00103         return $this;
00104     }
00105 
00112     public function setPrepend($value = null)
00113     {
00114         $this->_prepend = $value;
00115         return $this;
00116     }
00117 
00123     public function getPrepend()
00124     {
00125         return $this->_prepend;
00126     }
00127 
00133     public function getAppend()
00134     {
00135         return $this->_append;
00136     }
00137     
00138     public function postDispatch(Zend_Controller_Request_Abstract $request)
00139     {
00140         $headTitle = $this->_view->headTitle();
00141         $headTitle->headTitle($this->_prepend, 'PREPEND');
00142         $headTitle->headTitle($this->_append, 'APPEND');
00143     }
00144 }