]> git.mxchange.org Git - core.git/commitdiff
Added fileName parameter.
authorRoland Haeder <roland@mxchange.org>
Wed, 14 May 2014 20:58:48 +0000 (22:58 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 14 May 2014 20:58:48 +0000 (22:58 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/file_stack/class_

index 78cdde3f367828f3e4f7cf12e015b9b3e5e3e561..e831f5d2542bc1480e6a22559ab7035edb126cd6 100644 (file)
@@ -173,6 +173,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        private $wrapperInstance = NULL;
 
+       /**
+        * An instance of a file I/O pointer class (not handler)
+        */
+       private $pointerInstance = NULL;
+
        /**
         * Thousands separator
         */
@@ -1218,6 +1223,25 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                return $this->iteratorInstance;
        }
 
+       /**
+        * Setter for FrameworkInputOutputPointer instance
+        *
+        * @param       $pointerInstance        An instance of an FrameworkInputOutputPointer
+        * @return      void
+        */
+       protected final function setPointerInstance (FrameworkInputOutputPointer $pointerInstance) {
+               $this->pointerInstance = $pointerInstance;
+       }
+
+       /**
+        * Getter for FrameworkInputOutputPointer instance
+        *
+        * @return      $pointerInstance        An instance of an FrameworkInputOutputPointer
+        */
+       public final function getPointerInstance () {
+               return $this->pointerInstance;
+       }
+
        /**
         * Checks whether an object equals this object. You should overwrite this
         * method to implement own equality checks
index b3359656431a7d83042e4dfcbad875b027071364..bdec190a86a350042e31f1122890351b85044913 100644 (file)
@@ -35,12 +35,19 @@ class ???FileStack extends BaseFileStack implements Stackable {
        /**
         * Creates an instance of this class
         *
+        * @param       $fileName               Absolute Name of stack file
         * @return      $stackInstance  An instance of a Stackable class
         */
-       public final static function create???FileStack () {
+       public final static function create???FileStack ($fileName) {
                // Get new instance
                $stackInstance = new ???FileStack();
 
+               // Get the I/O file pointer instance and handle over file name
+               $pointerInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_output_class', $fileName);
+
+               // Set instance here in stack
+               $stackInstance->setPointerInstance($pointerInstance);
+
                // Return the prepared instance
                return $stackInstance;
        }