PrestaShopWebservice::__construct PHP Méthode

__construct() public méthode

PrestaShopWebservice constructor. Throw an exception when CURL is not installed/activated getMessage(); } ?>
public __construct ( string $url, string $key, mixed $debug = true )
$url string Root URL for the shop
$key string Authentification key
$debug mixed Debug mode Activated (true) or deactivated (false)
    function __construct($url, $key, $debug = true)
    {
        if (!extension_loaded('curl')) {
            throw new PrestaShopWebserviceException('Please activate the PHP extension \'curl\' to allow use of PrestaShop webservice library');
        }
        $this->url = $url;
        $this->key = $key;
        $this->debug = $debug;
        $this->version = 'unknown';
    }