From 65eb0629dc49b62110abbaaf69600adc49b41f0a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 2 Dec 2020 01:30:05 +0100 Subject: [PATCH] Continued: - REFACTURING: imported new traits, will have more in the future - updated core framework MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../helper/connection/class_BaseConnectionHelper.php | 4 ++++ application/hub/classes/listener/class_BaseListener.php | 4 ++++ .../classes/package/assembler/class_PackageAssembler.php | 4 ++++ .../producer/cruncher/keys/class_BaseKeyProducer.php | 6 ++++++ core | 2 +- 5 files changed, 19 insertions(+), 1 deletion(-) diff --git a/application/hub/classes/helper/connection/class_BaseConnectionHelper.php b/application/hub/classes/helper/connection/class_BaseConnectionHelper.php index 95fc8e305..3bfc8d1c2 100644 --- a/application/hub/classes/helper/connection/class_BaseConnectionHelper.php +++ b/application/hub/classes/helper/connection/class_BaseConnectionHelper.php @@ -20,6 +20,7 @@ use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Registry\GenericRegistry; use Org\Mxchange\CoreFramework\Registry\Registerable; +use Org\Mxchange\CoreFramework\Traits\Stream\Output\OutputStreamTrait; use Org\Mxchange\CoreFramework\Visitor\Visitable; use Org\Mxchange\CoreFramework\Visitor\Visitor; @@ -46,6 +47,9 @@ use Org\Mxchange\CoreFramework\Visitor\Visitor; * along with this program. If not, see . */ abstract class BaseConnectionHelper extends BaseHubSystemHelper implements Visitable, Registerable { + // Load traits + use OutputStreamTrait; + // Exception codes const EXCEPTION_UNSUPPORTED_ERROR_HANDLER = 0x9100; diff --git a/application/hub/classes/listener/class_BaseListener.php b/application/hub/classes/listener/class_BaseListener.php index ba84a870d..cffcf73ec 100644 --- a/application/hub/classes/listener/class_BaseListener.php +++ b/application/hub/classes/listener/class_BaseListener.php @@ -24,6 +24,7 @@ use Org\Mxchange\CoreFramework\Handler\Handleable; use Org\Mxchange\CoreFramework\Registry\Register; use Org\Mxchange\CoreFramework\Socket\InvalidServerSocketException; use Org\Mxchange\CoreFramework\Socket\SocketAlreadyRegisteredException; +use Org\Mxchange\CoreFramework\Traits\Iterator\IteratorTrait; use Org\Mxchange\CoreFramework\Visitor\Visitable; use Org\Mxchange\CoreFramework\Visitor\Visitor; @@ -54,6 +55,9 @@ use \LogicException; * along with this program. If not, see . */ abstract class BaseListener extends BaseHubSystem implements Visitable { + // Load traits + use IteratorTrait; + // Exception code constants const EXCEPTION_SOCKET_ALREADY_REGISTERED = 0xa01; const EXCEPTION_SOCKET_CREATION_FAILED = 0xa02; diff --git a/application/hub/classes/package/assembler/class_PackageAssembler.php b/application/hub/classes/package/assembler/class_PackageAssembler.php index 15a7095f6..8bcdfceb6 100644 --- a/application/hub/classes/package/assembler/class_PackageAssembler.php +++ b/application/hub/classes/package/assembler/class_PackageAssembler.php @@ -20,6 +20,7 @@ use Org\Mxchange\CoreFramework\Handler\Handleable; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Utils\String\StringUtils; use Org\Mxchange\CoreFramework\Stacker\Stackable; +use Org\Mxchange\CoreFramework\Traits\Stream\Input\InputStreamTrait; use Org\Mxchange\CoreFramework\Visitor\Visitable; use Org\Mxchange\CoreFramework\Visitor\Visitor; @@ -50,6 +51,9 @@ use \BadMethodCallException; * along with this program. If not, see . */ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable, Visitable { + // Load traits + use InputStreamTrait; + /** * Name for stacker holding raw data of multiple messages */ diff --git a/application/hub/classes/producer/cruncher/keys/class_BaseKeyProducer.php b/application/hub/classes/producer/cruncher/keys/class_BaseKeyProducer.php index 644981e61..92f6ceeb4 100644 --- a/application/hub/classes/producer/cruncher/keys/class_BaseKeyProducer.php +++ b/application/hub/classes/producer/cruncher/keys/class_BaseKeyProducer.php @@ -5,6 +5,9 @@ namespace Org\Shipsimu\Hub\Producer\Cruncher\Key; // Import application-specific stuff use Org\Shipsimu\Hub\Producer\Cruncher\BaseCruncherProducer; +// Import framework stuff +use Org\Mxchange\CoreFramework\Traits\Iterator\IteratorTrait; + /** * A general KeyProducer class * @@ -28,6 +31,9 @@ use Org\Shipsimu\Hub\Producer\Cruncher\BaseCruncherProducer; * along with this program. If not, see . */ abstract class BaseKeyProducer extends BaseCruncherProducer { + // Load traits + use IteratorTrait; + /** * Protected constructor * diff --git a/core b/core index 977b9bbb8..9a7a272f0 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 977b9bbb804eda74ad2d819d1de082933dd0bb08 +Subproject commit 9a7a272f04e54537aaf30c282598c1742fe0ad88 -- 2.39.5