/** * Test function. Echoes a parameter back to the client. * * @params string $message The message to echo. * @return string * * @throws Error */ function test_echo($message) { $result = $this->m_api_core->api_call('buyat.test.echo', $this->m_api_key, array('message' => $message)); if (array_key_exists('message', $result)) { return $result['message']; } else { return $result['Error: Invalid response from API']; } }
/** * Test function. Echoes a parameter back to the client. * * @params string $message The message to echo. * @return string * * @throws BuyatException */ public function test_echo($message) { $result = $this->m_api_core->api_call('buyat.test.echo', $this->m_api_key, array('message' => $message)); if (array_key_exists('message', $result)) { return $result['message']; } else { throw new BuyatException('Invalid response from API'); } }