]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/factories/index/class_FileStackIndexFactory.php
Some updates:
[core.git] / framework / main / classes / factories / index / class_FileStackIndexFactory.php
index 612bf52be1e36908648bb6857ac4534d194b4d95..0f7ffa3e999c8f79f2fbca4b00223f951f0ea942 100644 (file)
@@ -1,17 +1,25 @@
 <?php
 // Own namespace
-namespace CoreFramework\Factory\Filesystem\Stack;
+namespace Org\Mxchange\CoreFramework\Factory\Filesystem\Stack;
 
 // Import framework stuff
-use CoreFramework\Factory\ObjectFactory;
-use CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Registry\Registry;
+use Org\Mxchange\CoreFramework\Stacker\Index\IndexableStack;
+
+// Import SPL stuff
+use \SplFileInfo;
 
 /**
  * A factory class for file-based stack indexes
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
+<<<<<<< HEAD:framework/main/classes/factories/index/class_FileStackIndexFactory.php
  * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+=======
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2016 Core Developer Team
+>>>>>>> Some updates::inc/main/classes/factories/index/class_FileStackIndexFactory.php
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -42,17 +50,17 @@ class FileStackIndexFactory extends ObjectFactory {
        /**
         * Returns a singleton (registry-based) StackableFile instance
         *
-        * @param       $stackName                      Name of the stack's file
-        * @return      $indexInstance          An instance of a IndexableStack class
+        * @param       $infoInstance   An instance of a SplFileInfo class
+        * @return      $indexInstance  An instance of a IndexableStack class
         */
-       public static final function createFileStackIndexInstance ($fileName, $type) {
+       public static final function createFileStackIndexInstance (SplFileInfo $infoInstance, $type) {
                // If there is no handler?
                if (Registry::getRegistry()->instanceExists($type . '_index')) {
                        // Get handler from registry
                        $indexInstance = Registry::getRegistry()->getInstance($type . '_index');
                } else {
                        // Get the handler instance
-                       $indexInstance = self::createObjectByConfiguredName($type . '_file_stack_index_class', array($fileName));
+                       $indexInstance = self::createObjectByConfiguredName($type . '_file_stack_index_class', array($infoInstance));
 
                        // Add check for interface
                        assert($indexInstance instanceof IndexableStack);