Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 3 Jan 2018 22:57:55 +0000 (23:57 +0100)
committerRoland Häder <roland@mxchange.org>
Wed, 3 Jan 2018 22:57:55 +0000 (23:57 +0100)
- ported to SplFileInfo way

Signed-off-by: Roland Häder <roland@mxchange.org>
framework/main/classes/resolver/controller/class_BaseControllerResolver.php
framework/main/classes/stacker/file/class_BaseFileStack.php

index 4435605..141fb9a 100644 (file)
@@ -80,7 +80,7 @@ abstract class BaseControllerResolver extends BaseResolver {
                        // Create controller class name
                        $className = sprintf(
                                '%s\%s%sController',
-                               $namespace,
+                               $this->getNamespace(),
                                $this->getCapitalizedClassPrefix(),
                                self::convertToClassName($controllerName)
                        );
index 0989592..1f20c0b 100644 (file)
@@ -9,6 +9,9 @@ use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
 use Org\Mxchange\CoreFramework\Iterator\Filesystem\SeekableWritableFileIterator;
 use Org\Mxchange\CoreFramework\Stacker\BaseStacker;
 
+// Import SPL stuff
+use \SplFileInfo;
+
 /**
  * A general file-based stack class
  *
@@ -166,14 +169,14 @@ abstract class BaseFileStack extends BaseStacker {
        /**
         * Initializes this file-based stack.
         *
-        * @param       $fileName       File name of this stack
+        * @param       $fileInfoInstance       An instance of a SplFileInfo class
         * @param       $type           Type of this stack (e.g. url_source for URL sources)
         * @return      void
         * @todo        Currently the stack file is not cached, please implement a memory-handling class and if enough RAM is found, cache the whole stack file.
         */
-       protected function initFileStack ($fileName, $type) {
+       protected function initFileStack (SplFileInfo $fileInfoInstance, $type) {
                // Get a stack file instance
-               $fileInstance = ObjectFactory::createObjectByConfiguredName('stack_file_class', array($fileName, $this));
+               $fileInstance = ObjectFactory::createObjectByConfiguredName('stack_file_class', array($fileInfoInstance, $this));
 
                // Get iterator instance
                $iteratorInstance = ObjectFactory::createObjectByConfiguredName('file_iterator_class', array($fileInstance));
@@ -216,7 +219,7 @@ abstract class BaseFileStack extends BaseStacker {
                 * Get stack index instance. This can be used for faster
                 * "defragmentation" and startup.
                 */
-               $indexInstance = FileStackIndexFactory::createFileStackIndexInstance($fileName, $type);
+               $indexInstance = FileStackIndexFactory::createFileStackIndexInstance($fileInfoInstance, $type);
 
                // And set it here
                $this->setIndexInstance($indexInstance);