From: Roland Häder Date: Wed, 3 Jan 2018 23:02:51 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=72572df2c667b54230009e05296a37ea6179dea7;p=core.git Continued: - yep, I'm getting closer, yet another SplFileInfo is needed Signed-off-by: Roland Häder --- diff --git a/framework/main/classes/factories/stacks/class_FileStackFactory.php b/framework/main/classes/factories/stacks/class_FileStackFactory.php index 637b8cee..4e9512fd 100644 --- a/framework/main/classes/factories/stacks/class_FileStackFactory.php +++ b/framework/main/classes/factories/stacks/class_FileStackFactory.php @@ -7,6 +7,9 @@ use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Factory\ObjectFactory; use Org\Mxchange\CoreFramework\Registry\Registry; +// Import SPL stuff +use \SplFileInfo; + /** * A factory class for file-based stacks * @@ -49,12 +52,12 @@ class FileStackFactory extends ObjectFactory { */ public static final function createFileStackInstance ($prefix, $stackName) { // Construct file stack name - $stackFileName = sprintf('%s%s/%s.%s', + $fileInfoInstance = new SplFileInfo(sprintf('%s%s/%s.%s', FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('framework_base_path'), FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('base_file_stacks_path'), $stackName, FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('file_stacks_extension') - ); + )); // If there is no handler? if (Registry::getRegistry()->instanceExists($stackName . '_stack')) { @@ -62,7 +65,7 @@ class FileStackFactory extends ObjectFactory { $stackInstance = Registry::getRegistry()->getInstance($stackName . '_stack'); } else { // Get the handler instance - $stackInstance = self::createObjectByConfiguredName($prefix . '_' . $stackName . '_stack_class', array($stackFileName, $prefix . '_' . $stackName)); + $stackInstance = self::createObjectByConfiguredName($prefix . '_' . $stackName . '_stack_class', array($fileInfoInstance, $prefix . '_' . $stackName)); // Add it to the registry Registry::getRegistry()->addInstance($stackName . '_stack', $stackInstance);