<?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\Registry\Register;
+use CoreFramework\Registry\Generic\Registry;
+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
*
* @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
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]
-?>