Exemplo n.º 1
0
 /**
  * Constructor
  */
 function __construct($dispatcher, $config = array())
 {
     if (isset($config['params'])) {
         if ($config['params'] instanceof JRegistry) {
             $this->params = $config['params'];
         } else {
             $this->params = new JRegistry();
             $this->params->loadINI($config['params']);
         }
     }
     if (isset($config['name'])) {
         $this->_name = $config['name'];
     }
     if (isset($config['type'])) {
         $this->_type = $config['type'];
     }
     //Register the plugin with the dispatcher
     $dispatcher->addListener($this);
     //Force the identifier to NULL for now
     $config['identifier'] = null;
     parent::__construct(new KConfig($config));
 }
 /**
  * Constructor
  */
 function __construct($dispatcher, $config = array())
 {
     if (isset($config['params'])) {
         if ($config['params'] instanceof JRegistry) {
             $this->_params = $config['params'];
         } else {
             $this->_params = new JRegistry();
             $this->_params->loadINI($config['params']);
         }
     }
     if (isset($config['name'])) {
         $this->_name = $config['name'];
     }
     if (isset($config['type'])) {
         $this->_type = $config['type'];
     }
     //Inject the identifier
     $config['service_identifier'] = KService::getIdentifier('plg:koowa.' . $this->_name);
     //Inject the service container
     $config['service_container'] = KService::getInstance();
     //Inject the dispatcher
     $config['dispatcher'] = $dispatcher;
     parent::__construct(new KConfig($config));
 }
Exemplo n.º 3
0
 /**
  * Constructor
  */
 function __construct($dispatcher, $config = array())
 {
     if (isset($config['params'])) {
         if ($config['params'] instanceof JRegistry) {
             $this->_params = $config['params'];
         } else {
             $this->_params = new JRegistry();
             if (version_compare(JVERSION, '1.6', '<')) {
                 $this->_params->loadINI($config['params']);
             } else {
                 $this->_params->loadString($config['params'], 'INI');
             }
         }
     }
     if (isset($config['name'])) {
         $this->_name = $config['name'];
     }
     if (isset($config['type'])) {
         $this->_type = $config['type'];
     }
     //Inject the identifier
     $config['service_identifier'] = KService::getIdentifier('plg:koowa.' . $this->_name);
     //Inject the service container
     $config['service_container'] = KService::getInstance();
     //Inject the dispatcher
     $config['dispatcher'] = KService::get('com://admin/default.event.dispatcher');
     parent::__construct(new KConfig($config));
 }