use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Registry\Registry;
+// Import SPL stuff
+use \SplFileInfo;
+
/**
* A factory class for file-based stacks
*
*/
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')) {
$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);