interface TinyPngInterface in TinyPNG 8
Interface TinyPngInterface.
@package Drupal\tinypng
Hierarchy
- interface \Drupal\tinypng\TinyPngInterface
Expanded class hierarchy of TinyPngInterface
All classes that implement TinyPngInterface
1 file declares its use of TinyPngInterface
File
- src/
TinyPngInterface.php, line 10
Namespace
Drupal\tinypngView source
interface TinyPngInterface {
/**
* Set TinyPNG API key.
*
* @param string $key
* TinyPNG API key.
* @param bool $reset
* Force to update previous API key.
*
* @return $this
* Current instance.
*/
public function setApiKey($key = NULL, $reset = FALSE);
/**
* Compress with \Tinify\fromUrl.
*
* @param string $url
* URI of image file.
*
* @return $this
* Current instance.
*/
public function setFromUrl($url);
/**
* Compress with \Tinify\fromFile.
*
* @param string $uri
* URI of file.
*
* @return $this
* Current instance.
*/
public function setFromFile($uri);
/**
* Save result to file.
*
* @param string $uri
* Destination URI.
*
* @return bool|int
* Size of new file.
*/
public function saveTo($uri);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TinyPngInterface:: |
public | function | Save result to file. | 1 |
TinyPngInterface:: |
public | function | Set TinyPNG API key. | 1 |
TinyPngInterface:: |
public | function | Compress with \Tinify\fromFile. | 1 |
TinyPngInterface:: |
public | function | Compress with \Tinify\fromUrl. | 1 |