From 0a8b4b46ee0cb91e509710e6b3eea738f00ba6ce Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Wed, 14 May 2014 22:58:48 +0200 Subject: [PATCH] Added fileName parameter. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../main/class_BaseFrameworkSystem.php | 24 +++++++++++++++++++ inc/classes/main/file_stack/class_ | 9 ++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 78cdde3f..e831f5d2 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -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 diff --git a/inc/classes/main/file_stack/class_ b/inc/classes/main/file_stack/class_ index b3359656..bdec190a 100644 --- a/inc/classes/main/file_stack/class_ +++ b/inc/classes/main/file_stack/class_ @@ -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; } -- 2.39.5