Perforce Chronicle 2012.2/486814
API Documentation
|
Enhances Redirector by providing minor tweaks (e.g. More...
Public Member Functions | |
preDispatch () | |
Automatically initialize redirector prior to dispatch. | |
redirectAndExit () | |
Extended to do nothing if unit testing. | |
Static Public Attributes | |
static | $unitTestEnabled = false |
Whether or not redirector is being used with unit tests and thus not exit (as that would break tests). | |
Protected Member Functions | |
_redirect ($url) | |
Extend parent object to not render the view for the original action if we're redirecting, as it won't be displayed. | |
Protected Attributes | |
$_exit = false |
Enhances Redirector by providing minor tweaks (e.g.
not render original action if redirecting).
P4Cms_Controller_Action_Helper_Redirector::_redirect | ( | $ | url | ) | [protected] |
Extend parent object to not render the view for the original action if we're redirecting, as it won't be displayed.
string | $url | The url to redirect to. |
{ parent::_redirect($url); $controller = $this->getActionController(); if ($controller instanceof Zend_Controller_Action) { $controller->getHelper('ViewRenderer')->setNoRender(); } }
P4Cms_Controller_Action_Helper_Redirector::preDispatch | ( | ) |
Automatically initialize redirector prior to dispatch.
{ // make the helper easier to access from the controller. $controller = $this->getActionController(); if ($controller instanceof Zend_Controller_Action) { $controller->redirector = $this; } return parent::preDispatch(); }
P4Cms_Controller_Action_Helper_Redirector::redirectAndExit | ( | ) |
Extended to do nothing if unit testing.
{ if (!static::$unitTestEnabled) { parent::redirectAndExit(); } }
P4Cms_Controller_Action_Helper_Redirector::$_exit = false [protected] |
P4Cms_Controller_Action_Helper_Redirector::$unitTestEnabled = false [static] |
Whether or not redirector is being used with unit tests and thus not exit (as that would break tests).