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 78cdde3..e831f5d 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 b335965..bdec190 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;
        }