// Import framework stuff
use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils;
/**
* A generic resolver class
*
* @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.shipsimu.org
*
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
abstract class BaseResolver extends BaseFrameworkSystem {
+ // Exception constants
+ const EXCEPTION_INVALID_COMMAND = 0x1d0;
+ const EXCEPTION_INVALID_CONTROLLER = 0x1d1;
+ const EXCEPTION_INVALID_ACTION = 0x1d2;
+ const EXCEPTION_INVALID_STATE = 0x1d3;
+
/**
* Namespace
*/
*/
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
*
* @param $className Real name of the class
* @return void
*/
- protected function __construct ($className) {
+ protected function __construct (string $className) {
// Call parent constructor
parent::__construct($className);
}
* @param $namespace Namespace to look in
* @return void
*/
- protected final function setNamespace ($namespace) {
- $this->namespace = (string) $namespace;
+ protected final function setNamespace (string $namespace) {
+ $this->namespace = $namespace;
}
/**
* @param $className Name of the class
* @return void
*/
- protected final function setClassName ($className) {
- $this->className = (string) $className;
+ protected final function setClassName (string $className) {
+ $this->className = $className;
}
/**
$className = $this->getClassPrefix();
// And capitalize it
- $className = self::convertToClassName($className);
+ $className = StringUtils::convertToClassName($className);
// Return it
return $className;
* @param $classPrefix Last validated classPrefix
* @return void
*/
- protected final function setClassPrefix ($classPrefix) {
- $this->classPrefix = (string) $classPrefix;
+ protected final function setClassPrefix (string $classPrefix) {
+ $this->classPrefix = $classPrefix;
}
/**