use CoreFramework\Registry\Registry;
use CoreFramework\Stacker\Index\IndexableStack;
+// Import SPL stuff
+use \SplFileInfo;
+
/**
* A factory class for file-based stack indexes
*
/**
* 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);