/** * 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')); }
/** * Initializes the options for the object. * * Called from {@link __construct()} as a first step of object instantiation. * * @param object An optional KConfig object with configuration options. */ protected function _initialize(KConfig $config) { $config->append(array('component' => $this->getIdentifier()->package)); parent::_initialize($config); }