]> git.mxchange.org Git - core.git/blobdiff - inc/main/classes/class_BaseFrameworkSystem.php
Continued:
[core.git] / inc / main / classes / class_BaseFrameworkSystem.php
index 66473a4d73d4c49e6a068b59b338406b17105e9d..16dc8d890ea3016dc74bd2a9610129ed31905c6b 100644 (file)
@@ -1,11 +1,24 @@
 <?php
+// Own namespace
+namespace CoreFramework\Object;
+
+// Import framework stuff
+use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Generic\FrameworkInterface;
+use CoreFramework\Loader\ClassLoader;
+use CoreFramework\Manager\ManageableApplication;
+use CoreFramework\Template\CompileableTemplate;
+
+// Import SPL stuff
+use \stdClass;
+
 /**
  * The simulator system class is the super class of all other classes. This
  * class handles saving of games etc.
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -3450,6 +3463,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         * @return      void
         * @throws      InvalidSocketException  If $socketResource is no socket resource
         * @throws      NoSocketErrorDetectedException  If socket_last_error() gives zero back
+        * @todo        Move all this socket-related stuff into own class, most of it resides in BaseListener
         */
        protected final function handleSocketError ($method, $line, $socketResource, array $socketData) {
                // This method handles only socket resources
@@ -3482,28 +3496,4 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                socket_clear_error($socketResource);
        }
 
-       /**
-        * Constructs a callable method name from given socket error code. If the
-        * method is not found, a generic one is used.
-        *
-        * @param       $errorCode              Error code from socket_last_error()
-        * @return      $handlerName    Call-back method name for the error handler
-        * @throws      UnsupportedSocketErrorHandlerException If the error handler is not implemented
-        */
-       protected function getSocketErrorHandlerFromCode ($errorCode) {
-               // Create a name from translated error code
-               $handlerName = 'socketError' . self::convertToClassName($this->translateSocketErrorCodeToName($errorCode)) . 'Handler';
-
-               // Is the call-back method there?
-               if (!method_exists($this, $handlerName)) {
-                       // Please implement this
-                       throw new UnsupportedSocketErrorHandlerException(array($this, $handlerName, $errorCode), BaseConnectionHelper::EXCEPTION_UNSUPPORTED_ERROR_HANDLER);
-               } // END - if
-
-               // Return it
-               return $handlerName;
-       }
 }
-
-// [EOF]
-?>