From: Roland Häder Date: Fri, 19 May 2017 16:18:18 +0000 (+0200) Subject: also the factory has been imported X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=dac90dee37db3dcdb64eba38b351df593f4e2bdb;p=core.git also the factory has been imported Signed-off-by: Roland Häder --- diff --git a/framework/bootstrap/bootstrap.inc.php b/framework/bootstrap/bootstrap.inc.php index 6611496e..7a28f753 100644 --- a/framework/bootstrap/bootstrap.inc.php +++ b/framework/bootstrap/bootstrap.inc.php @@ -7,7 +7,7 @@ use CoreFramework\Bootstrap\FrameworkBootstrap; * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2016 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.ship-simu.org * diff --git a/framework/bootstrap/class_FrameworkBootstrap.php b/framework/bootstrap/class_FrameworkBootstrap.php index 317bf5dd..000a2a9d 100644 --- a/framework/bootstrap/class_FrameworkBootstrap.php +++ b/framework/bootstrap/class_FrameworkBootstrap.php @@ -25,7 +25,7 @@ use \BadMethodCallException; * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2016 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.ship-simu.org * diff --git a/framework/main/classes/factories/info/.htaccess b/framework/main/classes/factories/info/.htaccess new file mode 100644 index 00000000..3a428827 --- /dev/null +++ b/framework/main/classes/factories/info/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/framework/main/classes/factories/info/class_ConnectionInfoFactory.php b/framework/main/classes/factories/info/class_ConnectionInfoFactory.php new file mode 100644 index 00000000..e08627db --- /dev/null +++ b/framework/main/classes/factories/info/class_ConnectionInfoFactory.php @@ -0,0 +1,71 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class ConnectionInfoFactory extends ObjectFactory { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Returns a singleton (registry-based) ShareableInfo instance + * + * @param $protocolName Name of protocol (e.g. 'tcp') + * @param $type Connection type ('listener' or 'helper') + * @return $infoInstance An instance of a ShareableInfo class + */ + public static final function createConnectionInfoInstance ($protocolName, $type) { + // Generate key + $key = 'connection_info_' . $protocolName . '_' . $type; + + // If there is no info? + if (Registry::getRegistry()->instanceExists($key)) { + // Get info from registry + $infoInstance = Registry::getRegistry()->getInstance($key); + } else { + // Get the info instance + $infoInstance = self::createObjectByConfiguredName('connection_info_class'); + + // Add it to the registry + Registry::getRegistry()->addInstance($key, $infoInstance); + } + + // Return the instance + return $infoInstance; + } +} + +// [EOF] +?> diff --git a/framework/main/classes/handler/raw_data/network/class_ b/framework/main/classes/handler/raw_data/network/class_ index 09dbcf3b..781811c8 100644 --- a/framework/main/classes/handler/raw_data/network/class_ +++ b/framework/main/classes/handler/raw_data/network/class_ @@ -1,10 +1,13 @@ * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub 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 * diff --git a/framework/main/classes/handler/raw_data/network/class_BaseRawDataHandler.php b/framework/main/classes/handler/raw_data/network/class_BaseRawDataHandler.php index 32f63dc9..e4ec7112 100644 --- a/framework/main/classes/handler/raw_data/network/class_BaseRawDataHandler.php +++ b/framework/main/classes/handler/raw_data/network/class_BaseRawDataHandler.php @@ -11,7 +11,7 @@ use CoreFramework\Handler\BaseHandler; * * @author Roland Haeder * @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 * diff --git a/framework/main/classes/info/class_ b/framework/main/classes/info/class_ index b1926e16..ad8f9761 100644 --- a/framework/main/classes/info/class_ +++ b/framework/main/classes/info/class_ @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub 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.ship-simu.org * diff --git a/framework/main/classes/info/class_BaseInfo.php b/framework/main/classes/info/class_BaseInfo.php index dad58709..e8354c79 100644 --- a/framework/main/classes/info/class_BaseInfo.php +++ b/framework/main/classes/info/class_BaseInfo.php @@ -10,7 +10,7 @@ use CoreFramework\Object\BaseFrameworkSystem; * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub 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.ship-simu.org * diff --git a/framework/main/classes/info/connection/class_ConnectionInfo.php b/framework/main/classes/info/connection/class_ConnectionInfo.php index 5443ece9..b3f50ec4 100644 --- a/framework/main/classes/info/connection/class_ConnectionInfo.php +++ b/framework/main/classes/info/connection/class_ConnectionInfo.php @@ -11,7 +11,7 @@ use CoreFramework\Registry\Registerable; * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub 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.ship-simu.org * diff --git a/framework/main/classes/listener/class_BaseListenerDecorator.php b/framework/main/classes/listener/class_BaseListenerDecorator.php index b2f73a61..0c9cd1c1 100644 --- a/framework/main/classes/listener/class_BaseListenerDecorator.php +++ b/framework/main/classes/listener/class_BaseListenerDecorator.php @@ -12,7 +12,7 @@ use CoreFramework\Visitor\Visitor; * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2016 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 * diff --git a/framework/main/classes/listener/socket/decorator/class_SocketFileListenerDecorator.php b/framework/main/classes/listener/socket/decorator/class_SocketFileListenerDecorator.php index 85a66dc0..4e3fce63 100644 --- a/framework/main/classes/listener/socket/decorator/class_SocketFileListenerDecorator.php +++ b/framework/main/classes/listener/socket/decorator/class_SocketFileListenerDecorator.php @@ -10,7 +10,7 @@ use CoreFramework\Listener\Listenable; * * @author Roland Haeder * @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 * diff --git a/framework/main/interfaces/listener/class_Listenable.php b/framework/main/interfaces/listener/class_Listenable.php index 20dae1f5..143f87a8 100644 --- a/framework/main/interfaces/listener/class_Listenable.php +++ b/framework/main/interfaces/listener/class_Listenable.php @@ -10,7 +10,7 @@ use CoreFramework\Generic\FrameworkInterface; * * @author Roland Haeder * @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 * diff --git a/framework/main/interfaces/shareable/info/class_ShareableInfo.php b/framework/main/interfaces/shareable/info/class_ShareableInfo.php index cd7fe45d..128e2c9f 100644 --- a/framework/main/interfaces/shareable/info/class_ShareableInfo.php +++ b/framework/main/interfaces/shareable/info/class_ShareableInfo.php @@ -11,7 +11,7 @@ use CoreFramework\Listener\Listenable; * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub 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 * diff --git a/framework/main/tests/commands/console/class_TestsConsoleMainCommand.php b/framework/main/tests/commands/console/class_TestsConsoleMainCommand.php index 92bcf2a4..ef6d1c4f 100644 --- a/framework/main/tests/commands/console/class_TestsConsoleMainCommand.php +++ b/framework/main/tests/commands/console/class_TestsConsoleMainCommand.php @@ -17,7 +17,7 @@ use CoreFramework\Response\Responseable; * * @author Roland Haeder * @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 * diff --git a/framework/main/tests/controller/console/class_TestsConsoleDefaultNewsController.php b/framework/main/tests/controller/console/class_TestsConsoleDefaultNewsController.php index d86ebf35..156b247f 100644 --- a/framework/main/tests/controller/console/class_TestsConsoleDefaultNewsController.php +++ b/framework/main/tests/controller/console/class_TestsConsoleDefaultNewsController.php @@ -16,7 +16,7 @@ use CoreFramework\Response\Responseable; * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub 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 * diff --git a/framework/main/tests/filter/class_BaseTestsFilter.php b/framework/main/tests/filter/class_BaseTestsFilter.php index 04a141f2..5bc5ede0 100644 --- a/framework/main/tests/filter/class_BaseTestsFilter.php +++ b/framework/main/tests/filter/class_BaseTestsFilter.php @@ -10,7 +10,7 @@ use CoreFramework\Filter\BaseFilter; * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub 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 * diff --git a/framework/main/tests/resolver/command/console/class_TestsConsoleCommandResolver.php b/framework/main/tests/resolver/command/console/class_TestsConsoleCommandResolver.php index 5455f6a2..dab091ea 100644 --- a/framework/main/tests/resolver/command/console/class_TestsConsoleCommandResolver.php +++ b/framework/main/tests/resolver/command/console/class_TestsConsoleCommandResolver.php @@ -14,7 +14,7 @@ use CoreFramework\Resolver\Command\CommandResolver; * * @author Roland Haeder * @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 *