/** * 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); }
/** * 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()); }