*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright Copyright (c) 2007 - 2009 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
/**
* Prefix for local, remote or other resolver
*/
- private $actionPrefix = "";
+ private $actionPrefix = '';
/**
* Validated action name
*/
- private $actionName = "";
+ private $actionName = '';
/**
* Protected constructor
throw new EmptyVariableException(array($this, 'actionName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
} // END - if
+ // Create class name
+ $className = $this->actionPrefix . $this->convertToClassName($actionName) . 'Action';
+
// Now, let us create the full name of the action class
- $this->setClassName(sprintf("%s%sAction",
- $this->actionPrefix,
- $this->convertToClassName($actionName)
- ));
+ $this->setClassName($className);
// Is this class already loaded?
if (class_exists($this->getClassName())) {
$actionInstance = null;
// Create action class name
- $this->setClassName(sprintf("Web%sAction",
- $this->convertToClassName($this->getActionName())
- ));
+ $className = $this->actionPrefix . $this->convertToClassName($this->getActionName()) . 'Action';
+
+ // ... and set it
+ $this->setClassName($className);
// Initiate the action
$actionInstance = ObjectFactory::createObjectByName($this->getClassName(), array($this));