]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/states/class_BaseState.php
Continued:
[core.git] / framework / main / classes / states / class_BaseState.php
index c11ce464e03d3268fd21f5661140077dd79cb302..ca17995351c1b8db48227da5252e980f293661b2 100644 (file)
@@ -1,16 +1,20 @@
 <?php
 // Own namespace
-namespace CoreFramework\State;
+namespace Org\Mxchange\CoreFramework\State;
 
 // Import framework stuff
-use CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\Executor\Executor;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
+use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
+use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
+use Org\Mxchange\CoreFramework\State\Stateable;
 
 /**
  * A general state 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
  *
@@ -27,7 +31,7 @@ use CoreFramework\Object\BaseFrameworkSystem;
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
-class BaseState extends BaseFrameworkSystem implements Stateable {
+abstract class BaseState extends BaseFrameworkSystem implements Stateable {
        // Exception code constants
        const EXCEPTION_INVALID_STATE = 0xc00;
 
@@ -43,7 +47,7 @@ class BaseState extends BaseFrameworkSystem implements Stateable {
         * @param       $className      Name of the class
         * @return      void
         */
-       protected function __construct ($className) {
+       protected function __construct (string $className) {
                // Call parent constructor
                parent::__construct($className);
        }
@@ -63,7 +67,7 @@ class BaseState extends BaseFrameworkSystem implements Stateable {
         * @param       $stateName      Name of this state in a printable maner
         * @return      void
         */
-       protected final function setStateName ($stateName) {
+       protected final function setStateName (string $stateName) {
                $this->stateName = $stateName;
        }
 
@@ -75,7 +79,7 @@ class BaseState extends BaseFrameworkSystem implements Stateable {
         * @throws      UnsupportedOperationException   This method should be overwritten
         */
        public function executeState (Executor $executorInstance) {
-               throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION);
+               throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
 }