]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/index/class_BaseIndex.php
Continued:
[core.git] / framework / main / classes / index / class_BaseIndex.php
index 47a6f715a6118a7d93cab5a7ffc0459cba7b7f2b..2fdd6f186a3c062ef5ca75d4a67e45b546c0c828 100644 (file)
@@ -9,12 +9,15 @@ use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
 use Org\Mxchange\CoreFramework\Iterator\Filesystem\SeekableWritableFileIterator;
 use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
 
+// Import SPL stuff
+use \SplFileInfo;
+
 /**
  * A general index class
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2019 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -155,16 +158,13 @@ abstract class BaseIndex extends BaseFrameworkSystem {
        /**
         * Initializes this index
         *
-        * @param       $fileName       File name of this index
+        * @param       $fileInfoInstance       An instance of a SplFileInfo class
         * @return      void
         * @todo        Currently the index file is not cached, please implement a memory-handling class and if enough RAM is found, cache the whole index file.
         */
-       protected function initIndex ($fileName) {
-               // Append index file extension
-               $fileName .= $this->getConfigInstance()->getConfigEntry('index_extension');
-
+       protected function initIndex (SplFileInfo $fileInfoInstance) {
                // Get a file i/o pointer instance for index file
-               $fileInstance = ObjectFactory::createObjectByConfiguredName('index_file_class', array($fileName, $this));
+               $fileInstance = ObjectFactory::createObjectByConfiguredName('index_file_class', array($fileInfoInstance, $this));
 
                // Get iterator instance
                $iteratorInstance = ObjectFactory::createObjectByConfiguredName('file_iterator_class', array($fileInstance));