/**
* Last successfull resolved action
*/
- private $lastActionInstance = '';
+ private $lastActionInstance = null;
/**
* Protected constructor
parent::__construct(__CLASS__);
// Set prefix to "Web"
- $this->setActionPrefix("Web");
+ $this->setClassPrefix('Web');
}
/**
$actionName = $requestInstance->getRequestElement('action');
// Is the action empty? Then fall back to default action
- if (empty($actionName)) $actionName = $this->getConfigInstance()->getConfigEntry('default_action');
+ if (empty($actionName)) {
+ $actionName = $this->getConfigInstance()->getConfigEntry('default_action');
+ } // END - if
// Check if action is valid
if ($this->isActionValid($actionName) === false) {
} // END - if
// Set last action
- $this->lastActionInstance = $actionInstance;
+ $this->setResolvedInstance($actionInstance);
// Return the resolved action instance
return $actionInstance;
$actionName = $this->getActionName();
// Is the action empty? Then fall back to default action
- if (empty($actionName)) $actionName = $this->getConfigInstance()->getConfigEntry('default_action');
+ if (empty($actionName)) {
+ $actionName = $this->getConfigInstance()->getConfigEntry('default_action');
+ } // END - if
// Check if action is valid
if ($this->isActionValid($actionName) === false) {
// This action is invalid!
throw new InvalidActionException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);
- }
+ } // END - if
// Get the action
$actionInstance = $this->loadAction();