<?php
+// Own namespace
+namespace Org\Mxchange\City\Resolver\Controller;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Controller\InvalidControllerException;
+use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver;
+use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver;
+
/**
* A resolver for resolving controllers locally
*
* Creates an instance of a resolver class with a given controller
*
* @param $controllerName The controller we shall resolve
- * @param $applicationInstance An instance of a manageable application helper class
* @return $resolverInstance The prepared controller resolver instance
* @throws EmptyVariableException Thrown if default controller is not set
* @throws InvalidControllerException Thrown if default controller is invalid
*/
- public static final function createCityHtmlControllerResolver ($controllerName, ManageableApplication $applicationInstance) {
+ public static final function createCityHtmlControllerResolver ($controllerName) {
// Create the new instance
$resolverInstance = new CityHtmlControllerResolver();
if (empty($controllerName)) {
// Then thrown an exception here
throw new EmptyVariableException(array($resolverInstance, 'controllerName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
- } elseif ($resolverInstance->isControllerValid($controllerName) === FALSE) {
+ } elseif ($resolverInstance->isControllerValid('Org\Mxchange\City\Controller', $controllerName) === FALSE) {
// Invalid controller found
throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER);
}
- // Set the application instance
- $resolverInstance->setApplicationInstance($applicationInstance);
-
- // Set controller name
+ // Set namespace and controller name
+ $resolverInstance->setNamespace('Org\Mxchange\City\Controller');
$resolverInstance->setControllerName($controllerName);
// Return the prepared instance
return $resolverInstance;
}
+
}