params)) { $this->data = $rpc['params']; } else { $this->data = array(); } } public function getService($rpcMethod = null) { if ($rpcMethod != null) { return substr($rpcMethod, 0, strpos($rpcMethod, '.')); } else { return substr($this->service, 0, strpos($this->service, '.')); } } public function getOperation($rpcMethod = null) { if ($rpcMethod != null) { $op = substr($rpcMethod, strpos($rpcMethod, '.') + 1); } else { $op = substr($this->operation, strpos($this->operation, '.') + 1); } return $op; } public function getMethod($rpcMethod = null) { return $this->getOperation($rpcMethod); } public function getParameters() { return $this->data; } public function getParameter($paramName, $defaultValue = null) { if (isset($this->data[$paramName])) { return $this->data[$paramName]; } else { return $defaultValue; } } public function getListParameter($paramName) { if (isset($this->data[$paramName])) { if (is_array($this->data[$paramName])) { return $this->data[$paramName]; } else { // Allow up-conversion of non-array to array params. return array($this->data[$paramName]); } } else { return array(); } } public function applyUrlTemplate($urlTemplate) { // No params in the URL } }