<?php
+// Own namespace
+namespace Org\Mxchange\City\Resolver\Controller;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Resolver\Controller\BaseControllerResolver;
+use Org\Mxchange\CoreFramework\Resolver\Controller\ControllerResolver;
+
/**
* A resolver for resolving controllers locally
*
* @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2015 City Developer Team
+ * @copyright Copyright (c) 2015, 2016 City Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.shipsimu.org
*
* 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 createCityConsoleControllerResolver ($controllerName, ManageableApplication $applicationInstance) {
+ public static final function createCityConsoleControllerResolver ($controllerName) {
// Create the new instance
$resolverInstance = new CityConsoleControllerResolver();
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;
}
-}
-// [EOF]
-?>
+}