From: Roland Haeder Date: Sat, 7 Mar 2015 22:01:20 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=eab9623ecedbe97221a06b85ebb510fe0ffd0587;p=core.git Continued: - Added new class field $urlSourceInstance (What?! Not added before?) with interface UrlSource as type-hint - Removed deprecated classes/include files - Added some "life" to FiFoFileStack as this class may happen the same was the memory-based counter part FiFoStack. Still the BaseFileStack needs a lot enhancement (unfinished). Signed-off-by: Roland Häder --- diff --git a/inc/classes/interfaces/database/backend/class_DatabaseFrontendInterface.php b/inc/classes/interfaces/database/backend/class_DatabaseFrontendInterface.php deleted file mode 100644 index f551ef47..00000000 --- a/inc/classes/interfaces/database/backend/class_DatabaseFrontendInterface.php +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/inc/classes/interfaces/database/frontend/class_DatabaseFrontendInterface.php b/inc/classes/interfaces/database/frontend/class_DatabaseFrontendInterface.php deleted file mode 100644 index f551ef47..00000000 --- a/inc/classes/interfaces/database/frontend/class_DatabaseFrontendInterface.php +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 25e0986f..94769e12 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -148,6 +148,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { */ private $sourceInstance = NULL; + /** + * An instance of a UrlSource class + */ + private $urlSourceInstance = NULL; + /** * An instance of a InputStream class */ @@ -1129,7 +1134,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { /** * Setter for a Sourceable instance * - * @param $sourceInstance The Sourceable instance + * @param $sourceInstance An instance of a Sourceable class * @return void */ protected final function setSourceInstance (Sourceable $sourceInstance) { @@ -1139,12 +1144,31 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { /** * Getter for a Sourceable instance * - * @return $sourceInstance The Sourceable instance + * @return $sourceInstance An instance of a Sourceable class */ protected final function getSourceInstance () { return $this->sourceInstance; } + /** + * Setter for a UrlSource instance + * + * @param $sourceInstance An instance of a UrlSource class + * @return void + */ + protected final function setUrlSourceInstance (UrlSource $urlSourceInstance) { + $this->urlSourceInstance = $urlSourceInstance; + } + + /** + * Getter for a UrlSource instance + * + * @return $urlSourceInstance An instance of a UrlSource class + */ + protected final function getUrlSourceInstance () { + return $this->urlSourceInstance; + } + /** * Getter for a InputStream instance * diff --git a/inc/classes/main/database/class_BaseDatabaseFrontend.php b/inc/classes/main/database/class_BaseDatabaseFrontend.php deleted file mode 100644 index f551ef47..00000000 --- a/inc/classes/main/database/class_BaseDatabaseFrontend.php +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/inc/classes/main/handler/class_BaseHandler.php b/inc/classes/main/handler/class_BaseHandler.php deleted file mode 100644 index f551ef47..00000000 --- a/inc/classes/main/handler/class_BaseHandler.php +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/inc/classes/main/handler/raw_data/class_BaseRawDataHandler.php b/inc/classes/main/handler/raw_data/class_BaseRawDataHandler.php deleted file mode 100644 index f551ef47..00000000 --- a/inc/classes/main/handler/raw_data/class_BaseRawDataHandler.php +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/inc/classes/main/stacker/file/fifo/class_FiFoFileStack.php b/inc/classes/main/stacker/file/fifo/class_FiFoFileStack.php index fea12a53..47c1056a 100644 --- a/inc/classes/main/stacker/file/fifo/class_FiFoFileStack.php +++ b/inc/classes/main/stacker/file/fifo/class_FiFoFileStack.php @@ -59,19 +59,27 @@ class FiFoFileStack extends BaseFileStack implements StackableFile, Calculatable * @throws StackerFullException If the stack is full */ public function pushNamed ($stackerName, $value) { - $this->partialStub('stackerName=' . $stackerName . ',value[' . gettype($value) . ']=' . $value); + // Call the protected method + parent::addValue($stackerName, $value); } /** - * 'Pops' a value from a named stacker + * 'Pops' a value from a named stacker and returns it's value * * @param $stackerName Name of the stack - * @return void + * @return $value Value of the current stack entry * @throws NoStackerException If the named stacker was not found * @throws EmptyStackerException If the named stacker is empty */ public function popNamed ($stackerName) { - $this->partialStub('stackerName=' . $stackerName); + // Get the value + $value = $this->getNamed($stackerName); + + // Call the protected method + parent::popFirst($stackerName); + + // Return the value + return $value; } /** @@ -83,7 +91,8 @@ class FiFoFileStack extends BaseFileStack implements StackableFile, Calculatable * @throws EmptyStackerException If the named stacker is empty */ public function getNamed ($stackerName) { - $this->partialStub('stackerName=' . $stackerName); + // Call the protected method + return parent::getFirstValue($stackerName); } /** diff --git a/inc/hooks.php b/inc/hooks.php deleted file mode 100644 index f551ef47..00000000 --- a/inc/hooks.php +++ /dev/null @@ -1,3 +0,0 @@ -