From: Roland Häder Date: Wed, 3 Jan 2018 22:57:55 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=056196c38adf046842b9e2c14023b74606da16fd;p=core.git Continued: - ported to SplFileInfo way Signed-off-by: Roland Häder --- diff --git a/framework/main/classes/resolver/controller/class_BaseControllerResolver.php b/framework/main/classes/resolver/controller/class_BaseControllerResolver.php index 4435605f..141fb9a8 100644 --- a/framework/main/classes/resolver/controller/class_BaseControllerResolver.php +++ b/framework/main/classes/resolver/controller/class_BaseControllerResolver.php @@ -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) ); diff --git a/framework/main/classes/stacker/file/class_BaseFileStack.php b/framework/main/classes/stacker/file/class_BaseFileStack.php index 0989592c..1f20c0bc 100644 --- a/framework/main/classes/stacker/file/class_BaseFileStack.php +++ b/framework/main/classes/stacker/file/class_BaseFileStack.php @@ -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);