Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 7dfbb468ea
Fetching contributors…

Cannot retrieve contributors at this time

49 lines (48 sloc) 1.756 kB
/**{% filter block_comment %}
* {{ method.description }} ({% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }})
* {% endfilter %}
*
{% filter noblanklines %}
{% for param in method.required_parameters %}
* @param {{ param.codeType }} ${{ param.codeName }} {{ param.description }}{% endfor %}
{% if method.requestType %}
* @param $postBody the {@link {{ method.requestType.className }}}
{% endif %}
{% if method.optional_parameters %}
* @param array $optParams Optional parameters. Valid optional parameters are listed below.
*{% for param in method.optional_parameters %}
* @opt_param {{ param.codeType }} {{ param.wireName }} {{ param.description }}{% endfor %}
{% endif %}
{% if method.response %}
*
* @return {{ method.responseType.className }}
{% endif %}
*/
{% endfilter %}
public function {{ method.name }}({% call_template _func_params method method %})
{
{% filter noblanklines %}
{% indent %}$params = array({% parameter_list %}
{% for p in method.requiredParameters %}
{% parameter %}'{{ p.wireName }}' => ${{ p.codeName }}{% end_parameter %}
{% endfor %}
{% if method.requestType %}
{% parameter %}'postBody' => $postBody{% end_parameter %}
{% endif %}
{% end_parameter_list %});{% endindent %}
{% if method.optional_parameters %}
{% indent %}$params = array_merge($params, $optParams);{% endindent %}
{% endif %}
{% indent %}$data = $this->__call('{{ method.wireName }}', array($params));{% endindent %}
{% indent %}{% if method.response %}
if ($this->useObjects()) {
{% indent %}return new {{ method.responseType.className }}($data);{% endindent %}
} else {
{% indent %}return $data;{% endindent %}
}
{% else %}
return $data;
{% endif %}
{% endindent %}
{% endfilter %}
}
Jump to Line
Something went wrong with that request. Please try again.