X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fresolver%2Fclass_BaseResolver.php;h=06b34403f4c7c7bd0907d616daefaef2afcfb403;hp=cc840d4f3e3ffa757c94421e89456673da5d5c40;hb=4b88c118b615335d06bd74e444173d21aef4406c;hpb=3107989f93cfb5808ce9d75f1c7d2b7ee3d83d18 diff --git a/inc/classes/main/resolver/class_BaseResolver.php b/inc/classes/main/resolver/class_BaseResolver.php index cc840d4f..06b34403 100644 --- a/inc/classes/main/resolver/class_BaseResolver.php +++ b/inc/classes/main/resolver/class_BaseResolver.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007 - 2009 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -27,10 +27,21 @@ class BaseResolver extends BaseFrameworkSystem { */ private $className = ''; + /** + * Prefix for class + */ + private $classPrefix = ''; + + /** + * (Last) resolved instance + */ + private $resolvedInstance = null; + // Exception constants const EXCEPTION_INVALID_COMMAND = 0x1d0; const EXCEPTION_INVALID_CONTROLLER = 0x1d1; const EXCEPTION_INVALID_ACTION = 0x1d2; + const EXCEPTION_INVALID_STATE = 0x1d3; /** * Protected constructor @@ -41,10 +52,15 @@ class BaseResolver extends BaseFrameworkSystem { protected function __construct ($className) { // Call parent constructor parent::__construct($className); + } - // Clean up a little - $this->removeNumberFormaters(); - $this->removeSystemArray(); + /** + * Getter for class name + * + * @return $className Name of the class + */ + public final function getClassName () { + return $this->className; } /** @@ -54,16 +70,45 @@ class BaseResolver extends BaseFrameworkSystem { * @return void */ protected final function setClassName ($className) { - $this->className = $className; + $this->className = (string) $className; } /** - * Getter for class name + * Getter for class prefix * - * @return $className Name of the class + * @return $classPrefix Last validated classPrefix */ - public final function getClassName () { - return $this->className; + protected final function getClassPrefix () { + return $this->classPrefix; + } + + /** + * Setter for class prefix + * + * @param $classPrefix Last validated classPrefix + * @return void + */ + protected final function setClassPrefix ($classPrefix) { + $this->classPrefix = (string) $classPrefix; + } + + /** + * Getter for (last) resolved instance + * + * @return $resolvedInstance Last validated resolvedInstance + */ + protected final function getResolvedInstance () { + return $this->resolvedInstance; + } + + /** + * Setter for (last) resolved instance + * + * @param $resolvedInstance (Last) validated resolved instance + * @return void + */ + protected final function setResolvedInstance (FrameworkInterface $resolvedInstance) { + $this->resolvedInstance = $resolvedInstance; } }