]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 3 Jan 2018 23:02:51 +0000 (00:02 +0100)
committerRoland Häder <roland@mxchange.org>
Wed, 3 Jan 2018 23:02:51 +0000 (00:02 +0100)
- yep, I'm getting closer, yet another SplFileInfo is needed

Signed-off-by: Roland Häder <roland@mxchange.org>
framework/main/classes/factories/stacks/class_FileStackFactory.php

index 637b8ceed290557da99aae5ab81504abce9a4c7c..4e9512fd9d684d0624ab309a218c4bfebf75c6e4 100644 (file)
@@ -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);