public function getWebservice() { $webservice = new Webservice(); $webservice->setWebserviceDescription(new WadlWebserviceDescription(__DIR__ . '/Webservice/Test.wadl')); $webservice->on('responseReceived', function ($event) { $response = $event->getTarget(); if ($response->getHeaders()->get('Content-Type')->getMimeType() == 'application/json') { $decoded = json_decode($response->getBody()); $response->setBody($decoded); } }); return $webservice; }
/** * @param string $methodName Method name. * @param array $arguments Arguments. * @return \Blar\Http\HttpResponse */ public function __call($methodName, array $arguments = array()) { return parent::__call($methodName, array(array('arguments' => $arguments))); }