ludofleury
8/22/2012 - 12:53 PM

controllers.php

<?php

$controllers->post('/{myModel}/items', function (Model\myModel $myModel, Request $request) use ($app) {
//...
)}
->bind('mymodel_create')
->accept('url-encode')
->accept('json')
->contentType('kutio+xml', array('*/*', 'application/*', 'application/vnd.kutio+xml'))
->contentType('json', array('application/json', 'application/x-json'))
->convert('myModel', $providers['myModel'])
->security('OAuth');