//* DEBUG: */ echo __METHOD__.": Controller=".$controllerName;
if ($controllerName != $defaultController) {
// Create controller class name
- $this->setClassName(sprintf("Image%sController",
- $this->convertToClassName($controllerName)
- ));
+ $className = 'Image' . $this->convertToClassName($controllerName) . 'Controller';
+
+ // ... and set it
+ $this->setClassName($className);
} // END - if
//* DEBUG: */ echo ", controller=".$this->getClassName()."<br />\n";
} // END - if
// Initiate the resolver and controller
- $resolverInstance = ObjectFactory::createObjectByConfiguredName('image_cmd_resolver_class', array($controllerName, $this->getApplicationInstance()));
- $controllerInstance = ObjectFactory::createObjectByName($this->getClassName(), array($resolverInstance));
-
- // Remove resolver
- unset($resolverInstance);
+ $resolverInstance = ObjectFactory::createObjectByConfiguredName(
+ 'image_cmd_resolver_class',
+ array(
+ $controllerName,
+ $this->getApplicationInstance()
+ )
+ );
+ $controllerInstance = ObjectFactory::createObjectByName(
+ $this->getClassName(),
+ array($resolverInstance)
+ );
// Return the result
return $controllerInstance;