From: Roland Haeder Date: Mon, 6 Apr 2015 22:46:06 +0000 (+0200) Subject: Gee, found more copy-paste errors ... X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=4358f1004edb2caf464531503746414cec8ae2ce Gee, found more copy-paste errors ... Signed-off-by: Roland Häder --- diff --git a/inc/classes/main/resolver/controller/class_BaseControllerResolver.php b/inc/classes/main/resolver/controller/class_BaseControllerResolver.php index 05a1c119..5091c750 100644 --- a/inc/classes/main/resolver/controller/class_BaseControllerResolver.php +++ b/inc/classes/main/resolver/controller/class_BaseControllerResolver.php @@ -44,7 +44,7 @@ class BaseControllerResolver extends BaseResolver { * controller class is missing (bad!) */ protected function loadController ($controllerName) { - // Cache default command + // Cache default controller $defaultController = $this->getConfigInstance()->getConfigEntry('default_' . strtolower($this->getClassPrefix()) . '_controller'); // Init controller instance @@ -62,7 +62,7 @@ class BaseControllerResolver extends BaseResolver { // ... and set it $this->setClassName($className); } else { - // No news at main command or non-news command + // No news at main controller or non-news controller $this->setClassName($this->getCapitalizedClassPrefix() . 'DefaultNewsController'); } //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('AFTER: controller=' . $this->getClassName()); @@ -79,7 +79,7 @@ class BaseControllerResolver extends BaseResolver { // Try to read a config entry for our resolver including controller name... ;-) $resolverConfigEntry = sprintf('%s_cmd_%s_resolver_class', strtolower($this->getClassPrefix()), strtolower($controllerName)); - // Get the config, this will throw an exception if there is no special command resolver + // Get the config, this will throw an exception if there is no special controller resolver $resolverClass = $this->getConfigInstance()->getConfigEntry($resolverConfigEntry); // Initiate the resolver and controller @@ -143,10 +143,10 @@ class BaseControllerResolver extends BaseResolver { } /** - * Resolves the default controller of the given command + * Resolves the default controller of the given controller * * @return $controllerInstance A controller instance for the default - * command + * controller * @throws InvalidControllerInstanceException Thrown if $controllerInstance * is invalid */ @@ -155,15 +155,15 @@ class BaseControllerResolver extends BaseResolver { $controllerName = ''; $controllerInstance = NULL; - // Get the command name + // Get the controller name $controllerName = $this->getControllerName(); - // Get the command + // Get the controller $controllerInstance = $this->loadController($controllerName); // And validate it if ((!is_object($controllerInstance)) || (!$controllerInstance instanceof Controller)) { - // This command has an invalid instance! + // This controller has an invalid instance! throw new InvalidControllerInstanceException(array($this, $controllerName), self::EXCEPTION_INVALID_CONTROLLER); } // END - if diff --git a/inc/classes/main/resolver/controller/console/class_ConsoleControllerResolver.php b/inc/classes/main/resolver/controller/console/class_ConsoleControllerResolver.php index 418a6e2a..d0e5280d 100644 --- a/inc/classes/main/resolver/controller/console/class_ConsoleControllerResolver.php +++ b/inc/classes/main/resolver/controller/console/class_ConsoleControllerResolver.php @@ -36,31 +36,31 @@ class ConsoleControllerResolver extends BaseControllerResolver implements Contro } /** - * Creates an instance of a resolver class with a given command + * 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 command is not set + * @throws EmptyVariableException Thrown if default controller is not set * @throws InvalidControllerException Thrown if default controller is invalid */ public static final function createConsoleControllerResolver ($controllerName, ManageableApplication $applicationInstance) { // Create the new instance $resolverInstance = new ConsoleControllerResolver(); - // Is the variable $controllerName set and the command is valid? + // Is the variable $controllerName set and the controller is valid? if (empty($controllerName)) { // Then thrown an exception here - throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); + throw new EmptyVariableException(array($resolverInstance, 'controllerName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); } elseif ($resolverInstance->isControllerValid($controllerName) === FALSE) { - // Invalid command found + // Invalid controller found throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER); } // Set the application instance $resolverInstance->setApplicationInstance($applicationInstance); - // Set command name + // Set controller name $resolverInstance->setControllerName($controllerName); // Return the prepared instance diff --git a/inc/classes/main/resolver/controller/html/class_HtmlControllerResolver.php b/inc/classes/main/resolver/controller/html/class_HtmlControllerResolver.php index 20e101cf..c50f32a7 100644 --- a/inc/classes/main/resolver/controller/html/class_HtmlControllerResolver.php +++ b/inc/classes/main/resolver/controller/html/class_HtmlControllerResolver.php @@ -36,31 +36,31 @@ class HtmlControllerResolver extends BaseControllerResolver implements Controlle } /** - * Creates an instance of a resolver class with a given command + * 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 command is not set + * @throws EmptyVariableException Thrown if default controller is not set * @throws InvalidControllerException Thrown if default controller is invalid */ public static final function createHtmlControllerResolver ($controllerName, ManageableApplication $applicationInstance) { // Create the new instance $resolverInstance = new HtmlControllerResolver(); - // Is the variable $controllerName set and the command is valid? + // Is the variable $controllerName set and the controller is valid? if (empty($controllerName)) { // Then thrown an exception here - throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); + throw new EmptyVariableException(array($resolverInstance, 'controllerName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); } elseif ($resolverInstance->isControllerValid($controllerName) === FALSE) { - // Invalid command found + // Invalid controller found throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER); } // Set the application instance $resolverInstance->setApplicationInstance($applicationInstance); - // Set command name + // Set controller name $resolverInstance->setControllerName($controllerName); // Return the prepared instance diff --git a/inc/classes/main/resolver/controller/image/class_ImageControllerResolver.php b/inc/classes/main/resolver/controller/image/class_ImageControllerResolver.php index dde5f036..8a14a722 100644 --- a/inc/classes/main/resolver/controller/image/class_ImageControllerResolver.php +++ b/inc/classes/main/resolver/controller/image/class_ImageControllerResolver.php @@ -36,31 +36,31 @@ class ImageControllerResolver extends BaseControllerResolver implements Controll } /** - * Creates an instance of a resolver class with a given command + * 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 command is not set + * @throws EmptyVariableException Thrown if default controller is not set * @throws InvalidControllerException Thrown if default controller is invalid */ public static final function createImageControllerResolver ($controllerName, ManageableApplication $applicationInstance) { // Create the new instance $resolverInstance = new ImageControllerResolver(); - // Is the variable $controllerName set and the command is valid? + // Is the variable $controllerName set and the controller is valid? if (empty($controllerName)) { // Then thrown an exception here - throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); + throw new EmptyVariableException(array($resolverInstance, 'controllerName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); } elseif ($resolverInstance->isControllerValid($controllerName) === FALSE) { - // Invalid command found + // Invalid controller found throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER); } // Set the application instance $resolverInstance->setApplicationInstance($applicationInstance); - // Set command name + // Set controller name $resolverInstance->setControllerName($controllerName); // Return the prepared instance