public function put(EventInterface $event) {
        $request = $event->getRequest();
        $metadata = json_decode($request->getContent(), true);

        $event->getManager()
            ->trigger('db.metadata.delete')
            ->trigger('db.metadata.update', [
                'metadata' => $metadata,
            ]);

        $model = new Model\Metadata();
        $model->setData($metadata);

        $event->getResponse()->setModel($model);
    }
public function put(EventInterface $event) {
        $request = $event->getRequest();
        $metadata = json_decode($request->getContent(), true);

        $event->getManager()
            ->trigger('db.metadata.delete')
            ->trigger('db.metadata.update', [
                'metadata' => $metadata,
            ]);

        $model = new Model\Metadata();
        $model->setData($metadata);

        $event->getResponse()->setModel($model);
    }
public function put ( EventInterface $ event ) { $ request = $ event -> getRequest ( ) ; $ metadata = json_decode ( $ request -> getContent ( ) , true ) ; $ event -> getManager ( ) -> trigger ( 'db.metadata.delete' ) -> trigger ( 'db.metadata.update' , [ 'metadata' => $ metadata , ] ) ; $ model = new Model \ Metadata ( ) ; $ model -> setData ( $ metadata ) ; $ event -> getResponse ( ) -> setModel ( $ model ) ; }
Handle PUT requests

@param EventInterface $event The current event
Handle PUT requests