Mage_Core_Controller_Varien_Exception Class Reference

List of all members.

Public Member Functions

 prepareForward ($actionName=null, $controllerName=null, $moduleName=null, array $params=array())
 prepareRedirect ($path, $arguments=array())
 prepareFork ($actionName=null)
 prepareFlag ($action, $flag, $value)
 getResultFlags ()
 getResultCallback ()

Public Attributes

const RESULT_FORWARD = '_forward'
const RESULT_REDIRECT = '_redirect'

Protected Attributes

 $_resultCallback = null
 $_resultCallbackParams = array()
 $_defaultActionName = 'noroute'
 $_flags = array()


Detailed Description

Controller exception that can fork different actions, cause forward or redirect

Definition at line 31 of file Exception.php.


Member Function Documentation

getResultCallback (  ) 

Return results as callback for a controller

Returns:
array

Definition at line 118 of file Exception.php.

00119     {
00120         if (null === $this->_resultCallback) {
00121             $this->prepareFork();
00122         }
00123         return array($this->_resultCallback, $this->_resultCallbackParams);
00124     }

getResultFlags (  ) 

Return all set flags

Returns:
array

Definition at line 108 of file Exception.php.

00109     {
00110         return $this->_flags;
00111     }

prepareFlag ( action,
flag,
value 
)

Prepare a flag data

Parameters:
string $action
string $flag
bool $value
Returns:
Mage_Core_Controller_Varien_Exception

Definition at line 97 of file Exception.php.

00098     {
00099         $this->_flags[] = array($action, $flag, $value);
00100         return $this;
00101     }

prepareFork ( actionName = null  ) 

Prepare data for running a custom action

Parameters:
string $actionName
Returns:
Mage_Core_Controller_Varien_Exception

Definition at line 80 of file Exception.php.

00081     {
00082         if (null === $actionName) {
00083             $actionName = $this->_defaultActionName;
00084         }
00085         $this->_resultCallback = $actionName;
00086         return $this;
00087     }

prepareForward ( actionName = null,
controllerName = null,
moduleName = null,
array params = array() 
)

Prepare data for forwarding action

Parameters:
string $actionName
string $controllerName
string $moduleName
array $params
Returns:
Mage_Core_Controller_Varien_Exception

Definition at line 50 of file Exception.php.

00051     {
00052         $this->_resultCallback = self::RESULT_FORWARD;
00053         if (null === $actionName) {
00054             $actionName = $this->_defaultActionName;
00055         }
00056         $this->_resultCallbackParams = array($actionName, $controllerName, $moduleName, $params);
00057         return $this;
00058     }

prepareRedirect ( path,
arguments = array() 
)

Prepare data for redirecting

Parameters:
string $path
array $arguments
Returns:
Mage_Core_Controller_Varien_Exception

Definition at line 67 of file Exception.php.

00068     {
00069         $this->_resultCallback = self::RESULT_REDIRECT;
00070         $this->_resultCallbackParams($path, $arguments);
00071         return $this;
00072     }


Member Data Documentation

$_defaultActionName = 'noroute' [protected]

Definition at line 38 of file Exception.php.

$_flags = array() [protected]

Definition at line 39 of file Exception.php.

$_resultCallback = null [protected]

Definition at line 36 of file Exception.php.

$_resultCallbackParams = array() [protected]

Definition at line 37 of file Exception.php.

const RESULT_FORWARD = '_forward'

Definition at line 33 of file Exception.php.

const RESULT_REDIRECT = '_redirect'

Definition at line 34 of file Exception.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:54 2009 for Magento by  doxygen 1.5.8