public static function getClient() { if (!self::$key) { throw new AccountException("Provide an API key with Tinify\\setKey(...)"); } if (!self::$client) { self::$client = new Client(self::$key, self::$appIdentifier); } return self::$client; }
public static function getClient() { if (!self::$key) { throw new AccountException("Provide an API key with Tinify.key = ..."); } if (!self::$client) { self::$client = new Client(self::$key); } return self::$client; }
public static function setClient($client) { self::$client = $client; }