Пример #1
0
 /**
  * Send a response to PUT requests
  *
  * @param Imbo\EventManager\EventInterface $event The current event
  */
 public function put(Imbo\EventManager\EventInterface $event)
 {
     $model = new Imbo\Model\ArrayModel();
     $model->setData(['event' => $event->getName()]);
     $event->getResponse()->setModel($model);
 }
Пример #2
0
 /**
  * Set a custom header containing the current public key
  *
  * @param Imbo\EventManager\EventInterface $event The current event
  */
 public function getUser(Imbo\EventManager\EventInterface $event)
 {
     $event->getResponse()->headers->set('X-Imbo-CurrentUser', $event->getRequest()->getPublicKey());
 }