-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behavior in getRegisteredNames() #1355
Comments
For a practical example: 'extract_text_extractors' => [
'factories' => [
'catdoc' => ExtractText\Service\Extractor\CatdocFactory::class,
'docx2txt' => ExtractText\Service\Extractor\Docx2txtFactory::class,
'lynx' => ExtractText\Service\Extractor\LynxFactory::class,
'pdftotext' => ExtractText\Service\Extractor\PdftotextFactory::class,
],
'invokables' => [
'filegetcontents' => ExtractText\Extractor\Filegetcontents::class,
],
'aliases' => [
'application/msword' => 'catdoc',
'application/pdf' => 'pdftotext',
'application/rtf' => 'catdoc',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx2txt',
'text/html' => 'lynx',
'text/plain' => 'filegetcontents',
],
],
[
'application/msword',
'application/pdf',
'application/rtf',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'text/html',
'text/plain',
'filegetcontents',
] but I expect: [
'catdoc',
'docx2txt',
'lynx',
'pdftotext',
'filegetcontents',
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Omeka\ServiceManager\AbstractPluginManager::getRegisteredNames()
The method says it "returns only the names that are registered in configuration as invokable classes and factories," but, if aliases are present in the configuration, their keys overwrite the corresponding factory keys.
Take the following:
I expect
$manager->getRegisteredNames()
to return['foo']
but instead it returns['baz']
.The text was updated successfully, but these errors were encountered: