ExtensionPluginManager.php in Zircon Profile 8
File
vendor/zendframework/zend-feed/src/Writer/ExtensionPluginManager.php
View source
<?php
namespace Zend\Feed\Writer;
use Zend\ServiceManager\AbstractPluginManager;
class ExtensionPluginManager extends AbstractPluginManager {
protected $invokableClasses = [
'atomrendererfeed' => 'Zend\\Feed\\Writer\\Extension\\Atom\\Renderer\\Feed',
'contentrendererentry' => 'Zend\\Feed\\Writer\\Extension\\Content\\Renderer\\Entry',
'dublincorerendererentry' => 'Zend\\Feed\\Writer\\Extension\\DublinCore\\Renderer\\Entry',
'dublincorerendererfeed' => 'Zend\\Feed\\Writer\\Extension\\DublinCore\\Renderer\\Feed',
'itunesentry' => 'Zend\\Feed\\Writer\\Extension\\ITunes\\Entry',
'itunesfeed' => 'Zend\\Feed\\Writer\\Extension\\ITunes\\Feed',
'itunesrendererentry' => 'Zend\\Feed\\Writer\\Extension\\ITunes\\Renderer\\Entry',
'itunesrendererfeed' => 'Zend\\Feed\\Writer\\Extension\\ITunes\\Renderer\\Feed',
'slashrendererentry' => 'Zend\\Feed\\Writer\\Extension\\Slash\\Renderer\\Entry',
'threadingrendererentry' => 'Zend\\Feed\\Writer\\Extension\\Threading\\Renderer\\Entry',
'wellformedwebrendererentry' => 'Zend\\Feed\\Writer\\Extension\\WellFormedWeb\\Renderer\\Entry',
];
protected $shareByDefault = false;
public function validatePlugin($plugin) {
if ($plugin instanceof Extension\AbstractRenderer) {
return;
}
if ('Feed' == substr(get_class($plugin), -4)) {
return;
}
if ('Entry' == substr(get_class($plugin), -5)) {
return;
}
throw new Exception\InvalidArgumentException(sprintf('Plugin of type %s is invalid; must implement %s\\Extension\\RendererInterface ' . 'or the classname must end in "Feed" or "Entry"', is_object($plugin) ? get_class($plugin) : gettype($plugin), __NAMESPACE__));
}
}