From: Roland Haeder Date: Sun, 26 Feb 2017 20:47:30 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=747a486c01615aa7888c4012cbda3fdec267abad;p=core.git Continued: - added basic interface Poolable (seems to be lost?) - added "import" for it as well - added "import" of ListenerVisitor and DecoratorVisitor - added "import" of Listenable - added "import" of BaseDecorator Signed-off-by: Roland Häder --- diff --git a/framework/main/classes/class_BaseFrameworkSystem.php b/framework/main/classes/class_BaseFrameworkSystem.php index 24822399..45645cff 100644 --- a/framework/main/classes/class_BaseFrameworkSystem.php +++ b/framework/main/classes/class_BaseFrameworkSystem.php @@ -18,6 +18,7 @@ use CoreFramework\Filesystem\FrameworkDirectory; use CoreFramework\Generic\FrameworkInterface; use CoreFramework\Generic\NullPointerException; use CoreFramework\Handler\Stream\IoHandler; +use CoreFramework\Listener\Listenable; use CoreFramework\Lists\Listable; use CoreFramework\Loader\ClassLoader; use CoreFramework\Manager\ManageableApplication; diff --git a/framework/main/classes/container/socket/class_SocketContainer.php b/framework/main/classes/container/socket/class_SocketContainer.php index 01189966..fa1d2aab 100644 --- a/framework/main/classes/container/socket/class_SocketContainer.php +++ b/framework/main/classes/container/socket/class_SocketContainer.php @@ -3,6 +3,7 @@ namespace CoreFramework\Container\Socket; // Import framework stuff +use CoreFramework\Listener\Listenable; use CoreFramework\Registry\Registerable; /** diff --git a/framework/main/classes/decorator/template/class_XmlRewriterTemplateDecorator.php b/framework/main/classes/decorator/template/class_XmlRewriterTemplateDecorator.php index 8dc142ea..9b4e6a03 100644 --- a/framework/main/classes/decorator/template/class_XmlRewriterTemplateDecorator.php +++ b/framework/main/classes/decorator/template/class_XmlRewriterTemplateDecorator.php @@ -3,6 +3,7 @@ namespace CoreFramework\Template\Xml; // Import framework stuff +use CoreFramework\Generic\BaseDecorator; use CoreFramework\Manager\ManageableApplication; use CoreFramework\Response\Responseable; use CoreFramework\Template\CompileableTemplate; diff --git a/framework/main/classes/decorator/xml/class_XmlCompactorDecorator.php b/framework/main/classes/decorator/xml/class_XmlCompactorDecorator.php index 50fba45f..3bd84ad3 100644 --- a/framework/main/classes/decorator/xml/class_XmlCompactorDecorator.php +++ b/framework/main/classes/decorator/xml/class_XmlCompactorDecorator.php @@ -4,6 +4,7 @@ namespace CoreFramework\Parser\Xml; // Import framework stuff use CoreFramework\Factory\ObjectFactory; +use CoreFramework\Generic\BaseDecorator; use CoreFramework\Parser\Parseable; /** diff --git a/framework/main/classes/listener/class_ b/framework/main/classes/listener/class_ index 49eec7a4..d98b8e39 100644 --- a/framework/main/classes/listener/class_ +++ b/framework/main/classes/listener/class_ @@ -1,4 +1,10 @@ . */ interface ??? extends FrameworkInterface { -} -// [EOF] -?> +} diff --git a/framework/main/interfaces/pool/.htaccess b/framework/main/interfaces/pool/.htaccess new file mode 100644 index 00000000..3a428827 --- /dev/null +++ b/framework/main/interfaces/pool/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/framework/main/interfaces/pool/class_Poolable.php b/framework/main/interfaces/pool/class_Poolable.php new file mode 100644 index 00000000..424010bf --- /dev/null +++ b/framework/main/interfaces/pool/class_Poolable.php @@ -0,0 +1,47 @@ + + * @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 . + */ +interface Poolable extends FrameworkInterface { + + /** + * Pre-shuts down the pool + * + * @return void + */ + function preShutdown (); + + /** + * Adds a listener instance to this pool + * + * @param $poolInstance An instance of a Listenable class + * @return void + */ + function addListener (Listenable $poolInstance); + +} diff --git a/framework/main/interfaces/registry/socket/class_RegisterableSocket.php b/framework/main/interfaces/registry/socket/class_RegisterableSocket.php index 227fd839..a542f312 100644 --- a/framework/main/interfaces/registry/socket/class_RegisterableSocket.php +++ b/framework/main/interfaces/registry/socket/class_RegisterableSocket.php @@ -3,6 +3,7 @@ namespace CoreFramework\Registry\Socket; // Import framework stuff +use CoreFramework\Listener\Listenable; use CoreFramework\Registry\Registerable; /** diff --git a/framework/main/interfaces/visitor/decorator/class_DecoratorVisitor.php b/framework/main/interfaces/visitor/decorator/class_DecoratorVisitor.php index 033d013f..22bba43e 100644 --- a/framework/main/interfaces/visitor/decorator/class_DecoratorVisitor.php +++ b/framework/main/interfaces/visitor/decorator/class_DecoratorVisitor.php @@ -3,6 +3,7 @@ namespace CoreFramework\Visitor\Decorator; // Import framework stuff +use CoreFramework\Generic\BaseDecorator; use CoreFramework\Visitor\Visitor; /** @@ -33,6 +34,7 @@ interface DecoratorVisitor extends Visitor { * * @param $decoratorInstance A decorator instance * @return void + * @todo Find interface for this type-hint (only interface/array as type-hints rule) */ function visitDecorator (BaseDecorator $decoratorInstance); diff --git a/framework/main/interfaces/visitor/listener/class_ListenerVisitor.php b/framework/main/interfaces/visitor/listener/class_ListenerVisitor.php index 979e69c5..3da78201 100644 --- a/framework/main/interfaces/visitor/listener/class_ListenerVisitor.php +++ b/framework/main/interfaces/visitor/listener/class_ListenerVisitor.php @@ -3,6 +3,7 @@ namespace CoreFramework\Visitor\Listener; // Import framework stuff +use CoreFramework\Listener\Listenable; use CoreFramework\Visitor\Visitor; /** diff --git a/framework/main/interfaces/visitor/pool/class_PoolVisitor.php b/framework/main/interfaces/visitor/pool/class_PoolVisitor.php index a3bc173b..465ce3d3 100644 --- a/framework/main/interfaces/visitor/pool/class_PoolVisitor.php +++ b/framework/main/interfaces/visitor/pool/class_PoolVisitor.php @@ -3,6 +3,7 @@ namespace CoreFramework\Visitor\Pool; // Import framework stuff +use CoreFramework\Pool\Poolable; use CoreFramework\Visitor\Visitor; /**