request($path, $query_array, $merge_options); return $output_format && (is_object(json_decode($response)) || is_array(json_decode($response))) ? json_decode($response) : $response; } /** * Manage LoginRadius Authentication * * @param type $array * @return type */ public static function authentication($array = array()) { $result = array( "appkey" => LoginRadius::getApiKey(), "appsecret" => LoginRadius::getApiSecret() ); if (is_array($array) && sizeof($array) > 0) { $result = array_merge($result, $array); } return $result; } /** * Build Query string * * @param type $data * @return type */ public static function queryBuild($data = array()) { if (is_array($data) && sizeof($data) > 0) { return http_build_query($data); } else { return $data; } } }