コード例 #1
0
ファイル: Tinify.php プロジェクト: Cyken-Zeraux/tinify-php
 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;
 }
コード例 #2
0
ファイル: Tinify.php プロジェクト: sourcecube/Imager-Craft
 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;
 }
コード例 #3
0
 public static function setClient($client)
 {
     self::$client = $client;
 }