Example #1
0
 /**
  * Constructor: Primarily triggers the registration of core extensions and
  * loads those appropriate to this data container.
  *
  */
 public function __construct()
 {
     Writer::registerCoreExtensions();
     $this->_loadExtensions();
 }
Example #2
0
 /**
  * Load extensions from Zend\Feed\Writer\Writer
  *
  * @return void
  */
 protected function _loadExtensions()
 {
     Writer\Writer::registerCoreExtensions();
     $manager = Writer\Writer::getExtensionManager();
     $all = Writer\Writer::getExtensions();
     if (stripos(get_class($this), 'entry')) {
         $exts = $all['entryRenderer'];
     } else {
         $exts = $all['feedRenderer'];
     }
     foreach ($exts as $extension) {
         $plugin = $manager->get($extension);
         $plugin->setDataContainer($this->getDataContainer());
         $plugin->setEncoding($this->getEncoding());
         $this->extensions[$extension] = $plugin;
     }
 }
Example #3
0
 /**
  * Load extensions from Zend_Feed_Writer
  *
  * @return void
  */
 protected function _loadExtensions()
 {
     Writer\Writer::registerCoreExtensions();
     $all = Writer\Writer::getExtensions();
     if (stripos(get_called_class(), 'entry')) {
         $exts = $all['entryRenderer'];
     } else {
         $exts = $all['feedRenderer'];
     }
     foreach ($exts as $extension) {
         $className = Writer\Writer::getPluginLoader()->getClassName($extension);
         $this->_extensions[$extension] = new $className(
             $this->getDataContainer()
         );
         $this->_extensions[$extension]->setEncoding($this->getEncoding());
     }
 }