_resultCallback = self::RESULT_FORWARD; if (null === $actionName) { $actionName = $this->_defaultActionName; } $this->_resultCallbackParams = array($actionName, $controllerName, $moduleName, $params); return $this; } /** * Prepare data for redirecting * * @param string $path * @param array $arguments * @return Mage_Core_Controller_Varien_Exception */ public function prepareRedirect($path, $arguments = array()) { $this->_resultCallback = self::RESULT_REDIRECT; $this->_resultCallbackParams($path, $arguments); return $this; } /** * Prepare data for running a custom action * * @param string $actionName * @return Mage_Core_Controller_Varien_Exception */ public function prepareFork($actionName = null) { if (null === $actionName) { $actionName = $this->_defaultActionName; } $this->_resultCallback = $actionName; return $this; } /** * Prepare a flag data * * @param string $action * @param string $flag * @param bool $value * @return Mage_Core_Controller_Varien_Exception */ public function prepareFlag($action, $flag, $value) { $this->_flags[] = array($action, $flag, $value); return $this; } /** * Return all set flags * * @return array */ public function getResultFlags() { return $this->_flags; } /** * Return results as callback for a controller * * @return array */ public function getResultCallback() { if (null === $this->_resultCallback) { $this->prepareFork(); } return array($this->_resultCallback, $this->_resultCallbackParams); } }