Don't call the class' factory method directly, use ObjectFactory and
[core.git] / inc / classes / main / console / class_ConsoleTools.php
index 98d6ec4b53f7cffbcc4564d23357741078b8b222..32746b476178f973ecf1fdbe4fc60fdf2fcf8f50 100644 (file)
@@ -207,13 +207,13 @@ class ConsoleTools extends BaseFrameworkSystem {
 
                try {
                        // Get a file pointer
-                       $io = FrameworkFileInputPointer::createFrameworkFileInputPointer($helperInstance->getConfigInstance()->getConfigEntry('hostname_file'));
+                       $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_class', $helperInstance->getConfigInstance()->getConfigEntry('hostname_file'));
 
                        // Read the file
-                       $rawData = trim($io->readFromFile());
+                       $rawData = trim($fileInstance->readFromFile());
 
                        // Close the file
-                       $io->closeFile();
+                       $fileInstance->closeFile();
 
                        // Extract hostname from it
                        $hostname = $helperInstance->extractHostnameFromRawData($rawData);