Fixed calling ObjectFactory::createObjectByConfiguredName() as 2nd parameter must...
authorRoland Haeder <roland@mxchange.org>
Thu, 15 May 2014 19:23:04 +0000 (21:23 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 15 May 2014 19:23:04 +0000 (21:23 +0200)
Signed-off-by: Roland H├Ąder <roland@mxchange.org>
inc/classes/main/console/class_ConsoleTools.php
inc/classes/main/file_stack/class_BaseFileStack.php
inc/classes/main/io/io_handler/class_FileIoStream.php

index 32746b4..068bbf5 100644 (file)
@@ -207,7 +207,7 @@ class ConsoleTools extends BaseFrameworkSystem {
 
                try {
                        // Get a file pointer
-                       $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_class', $helperInstance->getConfigInstance()->getConfigEntry('hostname_file'));
+                       $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_class', array($helperInstance->getConfigInstance()->getConfigEntry('hostname_file')));
 
                        // Read the file
                        $rawData = trim($fileInstance->readFromFile());
index f782ad1..d53d1e3 100644 (file)
@@ -41,10 +41,10 @@ class BaseFileStack extends BaseFrameworkSystem {
         */
        protected function initStack ($fileName) {
                // Get a file i/o pointer instance
-               $pointerInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_output_class', $fileName);
+               $pointerInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_output_class', array($fileName));
 
                // Get iterator instance
-               $iteratorInstance = ObjectFactory::createObjectByConfiguredName('file_io_iterator_class', $pointerInstance);
+               $iteratorInstance = ObjectFactory::createObjectByConfiguredName('file_io_iterator_class', array($pointerInstance));
 
                // Is the instance implementing the right interface?
                assert($iteratorInstance instanceof SeekableFileIterator);
index d8cd580..35bc0c8 100644 (file)
@@ -79,7 +79,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil
                for ($idx = 0; $idx < 5; $idx++) {
                        // Get a file output pointer
                        try {
-                               $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_output_class', $fileName);
+                               $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_output_class', array($fileName));
                        } catch (FileIoException $e) {
                                // Create missing directory
                                $dirName = dirname($fileName);
@@ -147,7 +147,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil
                $readData = ''; // This will contain our read data
 
                // Get a file input handler
-               $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_class', $fqfn);
+               $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_class', array($fqfn));
 
                // Read all it's contents (we very and transparently decompress it below)
                while ($readRawLine = $fileInstance->readFromFile()) {