namespace CoreFramework\Console\Tools;
// Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Bootstrap\FrameworkBootstrap;
use CoreFramework\Factory\ObjectFactory;
use CoreFramework\Filesystem\FileNotFoundException;
use CoreFramework\Generic\FrameworkException;
use CoreFramework\Object\BaseFrameworkSystem;
use CoreFramework\Socket\InvalidSocketException;
+// Import SPL stuff
+use \SplFileInfo;
+
/**
* This class contains static helper functions for console applications
*
parent::__construct(__CLASS__);
// Cache configuration entry
- self::$quietResolver = FrameworkConfiguration::getSelfInstance()->getConfigEntry('quiet_dns_resolver');
+ self::$quietResolver = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('quiet_dns_resolver');
}
/**
// Get a new instance
$helperInstance = new ConsoleTools();
+ // Get SplFileInfo instance
+ $infoInstance = new SplFileInfo($helperInstance->getConfigInstance()->getConfigEntry('hostname_file'));
+
try {
// Get a file pointer
- $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_class', array($helperInstance->getConfigInstance()->getConfigEntry('hostname_file')));
+ $fileInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_class', array($infoInstance));
// Read the file
$rawData = trim($fileInstance->readFromFile());