/** * Maps the given arguments from Client::__call to the parameter of the api method * * @return array */ public function getParams() { $params = array(); $args = $this->args; $params['apikey'] = $this->apikey; $methods = Client::getMethods(); foreach ($methods[$this->method] as $key => $paramName) { if (isset($args[$key])) { $params[$paramName] = $args[$key]; } } return $params; }