From f2db082d66845e91b8e6176672c1d1961a80a740 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 29 Jan 2025 15:47:51 +0100 Subject: [PATCH] Continued: - used newly introduced trait LocalSearchCriteriaTrait instead of own code - updated 'core' framework - updated index.php (generic!) --- .../hub/classes/nodes/class_BaseHubNode.php | 21 ++----------------- core | 2 +- index.php | 8 +++---- 3 files changed, 7 insertions(+), 24 deletions(-) diff --git a/application/hub/classes/nodes/class_BaseHubNode.php b/application/hub/classes/nodes/class_BaseHubNode.php index 18a8d2713..b60afc265 100644 --- a/application/hub/classes/nodes/class_BaseHubNode.php +++ b/application/hub/classes/nodes/class_BaseHubNode.php @@ -37,6 +37,7 @@ use Org\Mxchange\CoreFramework\Request\Requestable; use Org\Mxchange\CoreFramework\Response\Responseable; use Org\Mxchange\CoreFramework\Result\Search\SearchableResult; use Org\Mxchange\CoreFramework\Task\Taskable; +use Org\Mxchange\CoreFramework\Traits\Criteria\Local\LocalSearchCriteriaTrait; use Org\Mxchange\CoreFramework\Traits\Crypto\CryptoTrait; use Org\Mxchange\CoreFramework\Traits\Database\Frontend\DatabaseFrontendTrait; use Org\Mxchange\CoreFramework\Traits\State\StateableTrait; @@ -72,6 +73,7 @@ abstract class BaseHubNode extends BaseHubSystem implements Updateable, AddableC // Load traits use CryptoTrait; use DatabaseFrontendTrait; + use LocalSearchCriteriaTrait; use StateableTrait; // Exception constants @@ -794,25 +796,6 @@ abstract class BaseHubNode extends BaseHubSystem implements Updateable, AddableC return $this->listenerPoolInstance; } - /** - * Setter for search instance - * - * @param $searchInstance Searchable criteria instance - * @return void - */ - public final function setSearchInstance (LocalSearchCriteria $searchInstance) { - $this->searchInstance = $searchInstance; - } - - /** - * Getter for search instance - * - * @return $searchInstance Searchable criteria instance - */ - public final function getSearchInstance () { - return $this->searchInstance; - } - /** * Setter for node id * diff --git a/core b/core index 5ec2948a1..cc9a1193f 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 5ec2948a189cd111b497146270034c9740aa6be5 +Subproject commit cc9a1193fe856148b71982e055dd05051751cef2 diff --git a/index.php b/index.php index 37fa26127..6a499bba8 100644 --- a/index.php +++ b/index.php @@ -58,7 +58,7 @@ final class ApplicationEntryPoint { * @return void * @todo This method is old code and needs heavy rewrite and should be moved to ApplicationHelper */ - public static final function exitApplication (string $message = '', int $code = -1, string $extraData = '', bool $silentMode = false) { + public static final function exitApplication (string $message = '', int $code = -1, string $extraData = '', bool $silentMode = false): void { // Is this method already called? //* NOISY-DEBUG: */ printf('[%s:%d]: message=%s,code=%d,extraData=%s,silentMode=%d - CALLED!' . PHP_EOL, __METHOD__, __LINE__, $message, $code, $extraData, intval($silentMode)); if (isset($GLOBALS['app_die_called'])) { @@ -200,7 +200,7 @@ final class ApplicationEntryPoint { * * @return $frameworkPath Path for framework */ - public static final function detectFrameworkPath () { + public static final function detectFrameworkPath (): string { // Is it not set? //* NOISY-DEBUG: */ printf('[%s:%d]: self::frameworkPath=%s - CALLED!' . PHP_EOL, __METHOD__, __LINE__, self::$frameworkPath); if (empty(self::$frameworkPath)) { @@ -255,7 +255,7 @@ final class ApplicationEntryPoint { * * @return $rootPath Root path */ - public static function getRootPath () { + public static function getRootPath (): string { // Get __DIR__, really simple and no detection return __DIR__; } @@ -268,7 +268,7 @@ final class ApplicationEntryPoint { * * @return void */ - public static final function main () { + public static final function main (): void { // Load bootstrap file //* NOISY-DEBUG: */ printf('[%s:%d]: CALLED!' . PHP_EOL, __METHOD__, __LINE__); require sprintf('%sbootstrap%sbootstrap.inc.php', self::detectFrameworkPath(), DIRECTORY_SEPARATOR); -- 2.39.5