]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/factories/index/class_FileStackIndexFactory.php
Opps, forgot this.
[core.git] / inc / classes / main / factories / index / class_FileStackIndexFactory.php
index df10a1c84f0cb742b4067faf1c08402d7fd91443..7a9f23b08f5b6f03de7762c5089b2056d53164c2 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -45,7 +45,10 @@ class FileStackIndexFactory extends ObjectFactory {
                        $indexInstance = Registry::getRegistry()->getInstance($type . '_index');
                } else {
                        // Get the handler instance
-                       $indexInstance = self::createObjectByConfiguredName('file_stack_' . $type . '_index_class', array($fileName));
+                       $indexInstance = self::createObjectByConfiguredName($type . '_file_stack_index_class', array($fileName));
+
+                       // Add check for interface
+                       assert($indexInstance instanceof IndexableStack);
 
                        // Add it to the registry
                        Registry::getRegistry()->addInstance($type . '_index', $indexInstance);