interface AvatarKitDownloadUtilityInterface in Avatar Kit 8.2
Interface for download utility.
Hierarchy
- interface \Drupal\avatars\AvatarKitDownloadUtilityInterface
Expanded class hierarchy of AvatarKitDownloadUtilityInterface
All classes that implement AvatarKitDownloadUtilityInterface
File
- src/
AvatarKitDownloadUtilityInterface.php, line 11
Namespace
Drupal\avatarsView source
interface AvatarKitDownloadUtilityInterface {
/**
* Get stream for a file.
*
* @param string $uri
* The URL of the file to download.
*
* @return \Psr\Http\Message\ResponseInterface
* The response stream.
*
* @throws \InvalidArgumentException
* If the URI is defective.
* @throws \Exception
* Various other exceptions thrown from HTTP client.
*/
public function get(string $uri) : ResponseInterface;
/**
* Creates a file entity from a PSR response.
*
* @param \Psr\Http\Message\ResponseInterface $response
* File to download.
* @param string $default_filename
* The desirable file name. Extension may be substituted.
*
* @return \Drupal\file\FileInterface|null
* The new file entity, or null if the file could not be downloaded.
*/
public function createFile(ResponseInterface $response, string $default_filename) : ?FileInterface;
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AvatarKitDownloadUtilityInterface:: |
public | function | Creates a file entity from a PSR response. | 1 |
AvatarKitDownloadUtilityInterface:: |
public | function | Get stream for a file. | 1 |