示例#1
0
 /**
  * Constructor.
  *
  * @param KConfig $config An optional KConfig object with configuration options.
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     if ($config->request->has('view')) {
         $this->_controller = $config->request->get('view');
     }
     $this->registerCallback('before.post', array($this, 'authenticateRequest'));
     $this->registerCallback('before.delete', array($this, 'authenticateRequest'));
 }
示例#2
0
 /**
  * Constructor.
  *
  * @param     object     An optional KConfig object with configuration options.
  */
 public function __construct(KConfig $config)
 {
     parent::__construct($config);
     //Set the component
     $this->setComponent($config->component);
 }