if (empty($type)) {
// Throw IAE
throw new InvalidArgumentException('Parameter "type" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
- } elseif (ObjectRegistry::getRegistry('generic')->instanceExists($type . '_index')) {
+ } elseif (ObjectRegistry::getRegistry('factory')->instanceExists($type . '_index')) {
// Get handler from registry
- $indexInstance = ObjectRegistry::getRegistry('generic')->getInstance($type . '_index');
+ $indexInstance = ObjectRegistry::getRegistry('factory')->getInstance($type . '_index');
} else {
// Get the handler instance
$indexInstance = ObjectFactory::createObjectByConfiguredName($type . '_file_stack_index_class', [$fileInfoInstance]);
// Add it to the registry
- ObjectRegistry::getRegistry('generic')->addInstance($type . '_index', $indexInstance);
+ ObjectRegistry::getRegistry('factory')->addInstance($type . '_index', $indexInstance);
}
// Return the instance