Continued:
authorRoland Haeder <roland@mxchange.org>
Sat, 7 Mar 2015 22:01:20 +0000 (23:01 +0100)
committerRoland Haeder <roland@mxchange.org>
Sat, 7 Mar 2015 22:01:20 +0000 (23:01 +0100)
- 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 <roland@mxchange.org>
inc/classes/interfaces/database/backend/class_DatabaseFrontendInterface.php [deleted file]
inc/classes/interfaces/database/frontend/class_DatabaseFrontendInterface.php [deleted file]
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/database/class_BaseDatabaseFrontend.php [deleted file]
inc/classes/main/handler/class_BaseHandler.php [deleted file]
inc/classes/main/handler/raw_data/class_BaseRawDataHandler.php [deleted file]
inc/classes/main/stacker/file/fifo/class_FiFoFileStack.php
inc/hooks.php [deleted file]

diff --git a/inc/classes/interfaces/database/backend/class_DatabaseFrontendInterface.php b/inc/classes/interfaces/database/backend/class_DatabaseFrontendInterface.php
deleted file mode 100644 (file)
index f551ef4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-// @DEPRECATED
-?>
diff --git a/inc/classes/interfaces/database/frontend/class_DatabaseFrontendInterface.php b/inc/classes/interfaces/database/frontend/class_DatabaseFrontendInterface.php
deleted file mode 100644 (file)
index f551ef4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-// @DEPRECATED
-?>
index 25e0986f07c910583695e597dd468e2c15b3be90..94769e1271ad49c672cb9e4e2d862bb19925cb79 100644 (file)
@@ -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 (file)
index f551ef4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-// @DEPRECATED
-?>
diff --git a/inc/classes/main/handler/class_BaseHandler.php b/inc/classes/main/handler/class_BaseHandler.php
deleted file mode 100644 (file)
index f551ef4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-// @DEPRECATED
-?>
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 (file)
index f551ef4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-// @DEPRECATED
-?>
index fea12a53320abbe0a2fdc39aa2318b47a4b679f3..47c1056a6a98dcf63721cb543a3b0121d2dd4bd1 100644 (file)
@@ -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 (file)
index f551ef4..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-// @DEPRECATED
-?>