use CoreFramework\Controller\Controller;
use CoreFramework\Factory\ObjectFactory;
use CoreFramework\Generic\EmptyVariableException;
+use CoreFramework\Registry\Registry;
use CoreFramework\Resolver\BaseResolver;
use CoreFramework\Resolver\Controller\ControllerResolver;
+
/**
* A generic controller resolver class
*
$resolverConfigEntry,
array(
$controllerName,
- $this->getApplicationInstance()
+ Registry::getRegistry()->getInstance('app')
)
);
$controllerInstance = ObjectFactory::createObjectByName(
*/
protected function isControllerValid ($namespace, $controllerName) {
// By default nothing shall be valid
- $isValid = FALSE;
+ $isValid = false;
// Is namespace and controller name set?
if (empty($namespace)) {
$this->setClassName($className);
// Try it hard to get an controller
- while ($isValid === FALSE) {
+ while ($isValid === false) {
// Is this class already loaded?
if (class_exists($this->getClassName())) {
// This class does exist. :-)
- $isValid = TRUE;
+ $isValid = true;
} elseif ($this->getClassName() != $newsControllerName) {
// Set default controller
$this->setClassName($newsControllerName);