コード例 #1
0
ファイル: component.php プロジェクト: janssit/nickys.janss.be
 /**
  * Constructor.
  *
  * @param ObjectConfig $config	An optional ObjectConfig object with configuration options.
  */
 public function __construct(ObjectConfig $config)
 {
     parent::__construct($config);
     //Authenticate none safe requests
     $this->registerCallback('before.post', array($this, 'authenticateRequest'));
     $this->registerCallback('before.put', array($this, 'authenticateRequest'));
     $this->registerCallback('before.delete', array($this, 'authenticateRequest'));
     //Sign GET request with a cookie token
     $this->registerCallback('after.get', array($this, 'signResponse'));
     //Force the controller to the information found in the request
     if ($config->request->query->has('view')) {
         $this->_controller = $config->request->query->get('view', 'alpha');
     }
 }
コード例 #2
0
ファイル: fragment.php プロジェクト: nooku/nooku-framework
 /**
  * Constructor.
  *
  * @param ObjectConfig $config	An optional ObjectConfig object with configuration options.
  */
 public function __construct(ObjectConfig $config)
 {
     parent::__construct($config);
     //Resolve the request
     $this->addCommandCallback('before.include', '_resolveRequest');
 }
コード例 #3
0
ファイル: dispatcher.php プロジェクト: nooku/nooku-framework
 /**
  * Constructor.
  *
  * @param ObjectConfig $config	An optional ObjectConfig object with configuration options.
  */
 public function __construct(ObjectConfig $config)
 {
     parent::__construct($config);
     //Set the supported methods
     $this->_methods = ObjectConfig::unbox($config->methods);
 }