public static function getUserAgent()
    {
        $curlVersion = curl_version(); // Do not move this inside $headers even if it is used only there.
                                       // PHP < 5.4 doesn't support call()['value'] directly.
        $userAgent = self::formatUserAgentProduct('PayPlug-PHP',
                                                  Payplug\Core\Config::LIBRARY_VERSION,
                                                  sprintf('PHP/%s; curl/%s', phpversion(), $curlVersion['version']));
        foreach (self::$defaultUserAgentProducts as $product) {
            $userAgent .= ' ' . self::formatUserAgentProduct($product[0], $product[1], $product[2]);
        }
        return $userAgent;
    }
public static function getUserAgent()
    {
        $curlVersion = curl_version(); // Do not move this inside $headers even if it is used only there.
                                       // PHP < 5.4 doesn't support call()['value'] directly.
        $userAgent = self::formatUserAgentProduct('PayPlug-PHP',
                                                  Payplug\Core\Config::LIBRARY_VERSION,
                                                  sprintf('PHP/%s; curl/%s', phpversion(), $curlVersion['version']));
        foreach (self::$defaultUserAgentProducts as $product) {
            $userAgent .= ' ' . self::formatUserAgentProduct($product[0], $product[1], $product[2]);
        }
        return $userAgent;
    }
public static function getUserAgent ( ) { $ curlVersion = curl_version ( ) ; // Do not move this inside $headers even if it is used only there. // PHP < 5.4 doesn't support call()['value'] directly. $ userAgent = self :: formatUserAgentProduct ( 'PayPlug-PHP' , Payplug \ Core \ Config :: LIBRARY_VERSION , sprintf ( 'PHP/%s; curl/%s' , phpversion ( ) , $ curlVersion [ 'version' ] ) ) ; foreach ( self :: $ defaultUserAgentProducts as $ product ) { $ userAgent .= ' ' . self :: formatUserAgentProduct ( $ product [ 0 ] , $ product [ 1 ] , $ product [ 2 ] ) ; } return $ userAgent ; }
Gets the User-Agent HTTP header sent for each HTTP request.
Gets the User - Agent HTTP header sent for each HTTP request .