public function __construct() { if (!extension_loaded('curl')) { throw new \ErrorException('cURL library is not loaded'); } $this->init(); }