*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
}
/**
* Creates an instance of a Web action resolver with a given default action
*
* @param $actionName The default action we shall execute
}
/**
* Creates an instance of a Web action resolver with a given default action
*
* @param $actionName The default action we shall execute
* @return $resolverInstance The prepared action resolver instance
* @throws EmptyVariableException Thrown if default action is not set
* @throws InvalidActionException Thrown if default action is invalid
*/
* @return $resolverInstance The prepared action resolver instance
* @throws EmptyVariableException Thrown if default action is not set
* @throws InvalidActionException Thrown if default action is invalid
*/
if (empty($actionName)) {
// Then thrown an exception here
throw new EmptyVariableException(array($resolverInstance, 'defaultAction'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
if (empty($actionName)) {
// Then thrown an exception here
throw new EmptyVariableException(array($resolverInstance, 'defaultAction'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
// Invalid action found
throw new InvalidActionException(array($resolverInstance, $actionName), self::EXCEPTION_INVALID_ACTION);
}
// Set the application instance
// Invalid action found
throw new InvalidActionException(array($resolverInstance, $actionName), self::EXCEPTION_INVALID_ACTION);
}
// Set the application instance
$actionName = $requestInstance->getRequestElement('action');
// Is the action empty? Then fall back to default action
$actionName = $requestInstance->getRequestElement('action');
// Is the action empty? Then fall back to default action
// This action is invalid!
throw new InvalidActionException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);
} // END - if
// This action is invalid!
throw new InvalidActionException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);
} // END - if
// This action is invalid!
throw new InvalidActionException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);
// This action is invalid!
throw new InvalidActionException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION);