Exemplo n.º 1
0
 /** 
  * Constructor.
  * 
  * @param mixed $dispatcher A dispatcher
  * @param array $config     An optional KConfig object with configuration options.
  * 
  * @return void
  */
 public function __construct($dispatcher = null, $config = array())
 {
     $config = new KConfig($config);
     parent::__construct($config);
     $this->_name = $config->name;
     KService::get('plg:contentfilter.chain')->addFilter($this);
 }
Exemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param   object  An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config = null)
 {
     //If no config is passed create it
     if (!isset($config)) {
         $config = new KConfig();
     }
     parent::__construct($config);
     $this->_dispatcher = $config->dispatcher;
 }
Exemplo n.º 3
0
 /**
  * Constructor.
  *
  * @param   object  An optional KConfig object with configuration options
  */
 public function __construct(KConfig $config = null)
 {
     //If no config is passed create it
     if (!isset($config)) {
         $config = new KConfig();
     }
     parent::__construct($config);
     if (is_null($config->event_dispatcher)) {
         throw new KMixinException('event_dispatcher [KEventDispatcher] option is required');
     }
     $this->_event_dispatcher = $config->event_dispatcher;
 }
Exemplo n.º 4
0
 /**
  * Constructor.
  *
  * @param KConfig $config An optional KConfig object with configuration options.
  */
 public function __construct(KConfig $config)
 {
     KService::set($config->service_identifier, $this);
     parent::__construct($config);
     $this->_entityset = $config->entityset;
     $this->_prototype = $config->prototype;
     $this->_store = $config->store;
     $this->_space = $config->space;
     $this->_resources = $config->resources;
     $this->_description = new AnDomainDescriptionDefault($config);
     //$this->_description		 = $this->getService($config->description, KConfig::unbox($config));
     //now set the attributes and relationships
     $this->_description->setAttribute(KConfig::unbox($config->attributes));
     $this->_description->setRelationship(KConfig::unbox($config->relationships));
     $this->_query = $this->getService($config->query, $config->toArray());
     // Mixin the behavior interface
     $config->mixer = $this;
     $this->mixin(new KMixinCommand($config));
     $this->mixin(new KMixinBehavior($config));
     //insert the reposiry with highest priority
     $this->getCommandChain()->enqueue($this, -PHP_INT_MAX);
 }