function bug($id) { $client = new jsonRPCClient("https://bugzilla.wikimedia.org/jsonrpc.cgi", true); try { $result = $client->__call('Bug.get', array(array('ids' => array($id)))); } catch (\Exception $e) { Fail::log($e); return false; } // send back a stdClass for the first bug in the results return (object) $result[1]['bugs'][0]; }
public function __call($method, $params = array()) { array_unshift($params, $this->key); return parent::__call($method, $params); }