Initialize the file-based stack with initStack() where e.g. the file i/o
authorRoland Haeder <roland@mxchange.org>
Wed, 14 May 2014 21:42:53 +0000 (23:42 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 14 May 2014 21:42:53 +0000 (23:42 +0200)
pointer instance can be set.

Signed-off-by: Roland H├Ąder <roland@mxchange.org>
inc/classes/main/decorator/class_BaseDecorator.php
inc/classes/main/factories/database/class_DatabaseWrapperFactory.php
inc/classes/main/factories/registry/class_SocketRegistryFactory.php
inc/classes/main/factories/xml/class_XmlTemplateEngineFactory.php
inc/classes/main/file_stack/class_
inc/classes/main/file_stack/class_BaseFileStack.php

index 13304d54e2c52cc874216b1dcd091d24ffaff132..4341959234159df0033ae43244c56d3aabfe9d77 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 0c0309b210a3899c337efda2b04ae15afd361329..f56d950801e2b542c11c7a8b4b6564615ad44587 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 6aaa5a1629418e1fe22c3faa2520ef096d972262..34ebbc996aa368fc8108285d34589adfb84fff6c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 38126f9e2d9105222e4dc1f80e5919372d4dd79b..8e50d2649f8c1c5c3c888af954973b8610dee7cf 100644 (file)
@@ -6,7 +6,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index bdec190a86a350042e31f1122890351b85044913..274f923f99bf7d3feec37cca6a82c0805712e943 100644 (file)
@@ -42,11 +42,8 @@ class ???FileStack extends BaseFileStack implements Stackable {
                // 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);
+               // Init this stack
+               $stackInstance->initStack($fileName);
 
                // Return the prepared instance
                return $stackInstance;
index 7c4c91e5bd497ad735cf204f9a591318d4e4507f..724f3c75bb2604ff8b636ddcbb7e675240256cc2 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -32,6 +32,20 @@ class BaseFileStack extends BaseFrameworkSystem {
                // Call parent constructor
                parent::__construct($className);
        }
+
+       /**
+        * Initializes this stack.
+        *
+        * @param       $fileName       File name of this stack
+        * @return      void
+        */
+       protected function initStack ($fileName) {
+               // Get a file i/o pointer instance
+               $pointerInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_output_class'
+
+               // And set it here
+               $this->setPointerInstance($pointerInstance);
+       }
 }
 
 // [EOF]