From: Roland Häder Date: Tue, 1 Dec 2020 22:25:35 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9787aa299f93ee4c579377b4174831454ab563c1;p=hub.git Continued: - added $helperInstance and getter/setter from framework as it was monolithic there - updated core framework Signed-off-by: Roland Häder --- diff --git a/application/hub/classes/container/socket/class_SocketContainer.php b/application/hub/classes/container/socket/class_SocketContainer.php index 283258f01..eb2ad4bd9 100644 --- a/application/hub/classes/container/socket/class_SocketContainer.php +++ b/application/hub/classes/container/socket/class_SocketContainer.php @@ -18,6 +18,7 @@ use Org\Shipsimu\Hub\Handler\Package\NetworkPackageHandler; use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Generic\NullPointerException; +use Org\Mxchange\CoreFramework\Helper\Helper; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Socket\InvalidSocketException; use Org\Mxchange\CoreFramework\Socket\NoSocketErrorDetectedException; @@ -115,6 +116,11 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita */ private $socketResource = false; + /** + * A helper instance for the form + */ + private $helperInstance = NULL; + /** * Protected constructor * @@ -1529,4 +1535,23 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita return $this->socketResource; } + /** + * Setter for helper instance + * + * @param $helperInstance An instance of a helper class + * @return void + */ + protected final function setHelperInstance (Helper $helperInstance) { + $this->helperInstance = $helperInstance; + } + + /** + * Getter for helper instance + * + * @return $helperInstance An instance of a helper class + */ + public final function getHelperInstance () { + return $this->helperInstance; + } + } diff --git a/application/hub/classes/info/class_BaseInfo.php b/application/hub/classes/info/class_BaseInfo.php index 4cfee87e1..f56407093 100644 --- a/application/hub/classes/info/class_BaseInfo.php +++ b/application/hub/classes/info/class_BaseInfo.php @@ -5,6 +5,9 @@ namespace Org\Shipsimu\Hub\Information; // Import application-specific stuff use Org\Shipsimu\Hub\Generic\BaseHubSystem; +// Import framework-specific stuff +use Org\Mxchange\CoreFramework\Helper\Helper; + /** * A general Info class * @@ -28,6 +31,11 @@ use Org\Shipsimu\Hub\Generic\BaseHubSystem; * along with this program. If not, see . */ abstract class BaseInfo extends BaseHubSystem { + /** + * A helper instance for the form + */ + private $helperInstance = NULL; + /** * Protected constructor * @@ -39,4 +47,23 @@ abstract class BaseInfo extends BaseHubSystem { parent::__construct($className); } + /** + * Setter for helper instance + * + * @param $helperInstance An instance of a helper class + * @return void + */ + protected final function setHelperInstance (Helper $helperInstance) { + $this->helperInstance = $helperInstance; + } + + /** + * Getter for helper instance + * + * @return $helperInstance An instance of a helper class + */ + public final function getHelperInstance () { + return $this->helperInstance; + } + } diff --git a/application/hub/classes/producer/cruncher/work_units/class_BaseUnitProducer.php b/application/hub/classes/producer/cruncher/work_units/class_BaseUnitProducer.php index bc801b509..8091aff6f 100644 --- a/application/hub/classes/producer/cruncher/work_units/class_BaseUnitProducer.php +++ b/application/hub/classes/producer/cruncher/work_units/class_BaseUnitProducer.php @@ -6,6 +6,7 @@ namespace Org\Shipsimu\Hub\Producer\Cruncher\Unit; use Org\Shipsimu\Hub\Producer\Cruncher\BaseCruncherProducer; // Import framework stuff +use Org\Mxchange\CoreFramework\Helper\Helper; use Org\Mxchange\CoreFramework\Template\CompileableTemplate; /** @@ -49,6 +50,11 @@ abstract class BaseUnitProducer extends BaseCruncherProducer { */ private $templateInstance = NULL; + /** + * A helper instance for the form + */ + private $helperInstance = NULL; + /** * Protected constructor * @@ -79,4 +85,23 @@ abstract class BaseUnitProducer extends BaseCruncherProducer { return $this->templateInstance; } + /** + * Setter for helper instance + * + * @param $helperInstance An instance of a helper class + * @return void + */ + protected final function setHelperInstance (Helper $helperInstance) { + $this->helperInstance = $helperInstance; + } + + /** + * Getter for helper instance + * + * @return $helperInstance An instance of a helper class + */ + public final function getHelperInstance () { + return $this->helperInstance; + } + } diff --git a/core b/core index 5c227d3d4..28ff0710d 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 5c227d3d4b639d9e5141bb218c414eb877250cf4 +Subproject commit 28ff0710d8eb3a2d0c1547d6ebeaae05eb50c7f6