Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 public static function setClient($client)
 {
     self::$client = $client;
 }