*
* @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, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
// Call parent constructor
parent::__construct(__CLASS__);
- // Set part description
- $this->setObjectDescription("Resolver for local web controllers");
-
- // Create unique ID number
- $this->generateUniqueId();
-
// Set prefix to "Image"
$this->setControllerPrefix("Image");
}
* controller class is missing (bad!)
*/
private function loadController ($controllerName) {
- // Debug message
- //* DEBUG: */ $this->debugBackTrace();
-
// Cache default command
$defaultController = $this->getConfigInstance()->readConfig('default_image_command');
$controllerInstance = null;
// Default controller
- $this->setClassName("ImageDefaultController");
+ $this->setClassName($defaultController);
// Generate the class name
//* DEBUG: */ echo __METHOD__.": Controller=".$controllerName;
$this->setClassName(sprintf("Image%sController",
$this->convertToClassName($controllerName)
));
- } else {
- // Default controller
- $this->setClassName("ImageDefaultController");
- }
+ } // END - if
//* DEBUG: */ echo ", controller=".$this->getClassName()."<br />\n";
// Is this class loaded?
if (!class_exists($this->getClassName())) {
- // Class not found, so try the default one or throw exception
+ // Class not found, so or throw an exception
throw new InvalidControllerException(array($this, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
} // END - if