Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

More aliases, fewer factories #11

Merged
merged 2 commits into from
Jan 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}
},
"require": {
"php": ">=5.5",
"php": "^5.5 || ^7.0",
"zendframework/zend-stdlib": "~2.7",
"zendframework/zend-json": "~2.5",
"zendframework/zend-math": "dev-develop as 2.6.0"
Expand Down
34 changes: 21 additions & 13 deletions src/AdapterPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,44 @@ class AdapterPluginManager extends AbstractPluginManager
{
protected $aliases = [
'igbinary' => Adapter\IgBinary::class,
'igBinary' => Adapter\IgBinary::class,
'IgBinary' => Adapter\IgBinary::class,
'json' => Adapter\Json::class,
'Json' => Adapter\Json::class,
'msgpack' => Adapter\MsgPack::class,
'msgPack' => Adapter\MsgPack::class,
'MsgPack' => Adapter\MsgPack::class,
'phpcode' => Adapter\PhpCode::class,
'phpCode' => Adapter\PhpCode::class,
'PhpCode' => Adapter\PhpCode::class,
'phpserialize' => Adapter\PhpSerialize::class,
'phpSerialize' => Adapter\PhpSerialize::class,
'PhpSerialize' => Adapter\PhpSerialize::class,
'pythonpickle' => Adapter\PythonPickle::class,
'pythonPickle' => Adapter\PythonPickle::class,
'PythonPickle' => Adapter\PythonPickle::class,
'wddx' => Adapter\Wddx::class,
'Wddx' => Adapter\Wddx::class
'Wddx' => Adapter\Wddx::class,
];

protected $factories = [
Adapter\IgBinary::class => InvokableFactory::class,
'zendserializeradapterigbinary' => InvokableFactory::class,
Adapter\Json::class => InvokableFactory::class,
'zendserializeradapterjson' => InvokableFactory::class,
Adapter\MsgPack::class => InvokableFactory::class,
'zendserializeradaptermsgpack' => InvokableFactory::class,
Adapter\PhpCode::class => InvokableFactory::class,
'zendserializeradapter\phpcode' => InvokableFactory::class,
Adapter\PhpSerialize::class => InvokableFactory::class,
Adapter\IgBinary::class => InvokableFactory::class,
Adapter\Json::class => InvokableFactory::class,
Adapter\MsgPack::class => InvokableFactory::class,
Adapter\PhpCode::class => InvokableFactory::class,
Adapter\PhpSerialize::class => InvokableFactory::class,
Adapter\PythonPickle::class => InvokableFactory::class,
Adapter\Wddx::class => InvokableFactory::class,
// Legacy (v2) due to alias resolution; canonical form of resolved
// alias is used to look up the factory, while the non-normalized
// resolved alias is used as the requested name passed to the factory.
'zendserializeradapterigbinary' => InvokableFactory::class,
'zendserializeradapterjson' => InvokableFactory::class,
'zendserializeradaptermsgpack' => InvokableFactory::class,
'zendserializeradapterphpcode' => InvokableFactory::class,
'zendserializeradapterphpserialize' => InvokableFactory::class,
Adapter\PythonPickle::class => InvokableFactory::class,
'zendserializeradapterpythonpickle' => InvokableFactory::class,
Adapter\Wddx::class => InvokableFactory::class,
'zendserializeradapterwddx' => InvokableFactory::class
'zendserializeradapterwddx' => InvokableFactory::class,
];

protected $instanceOf = Adapter\AdapterInterface::class;
Expand Down