interface RobohashInterface in Avatar Kit 8
Provides an interface to the Robohash.org API.
Hierarchy
- interface \Drupal\avatars_robohash\RobohashInterface
Expanded class hierarchy of RobohashInterface
All classes that implement RobohashInterface
File
- avatars_robohash/
src/ RobohashInterface.php, line 8
Namespace
Drupal\avatars_robohashView source
interface RobohashInterface {
/*
* URL for insecure requests.
*
* @var string
*/
const ROBOHASH_HOSTNAME = 'robohash.org';
/*
* Maximum width images output by the endpoint.
*
* @var int
*/
const DIMENSION_MAXIMUM_WIDTH = 300;
/*
* Maximum height images output by the endpoint.
*
* @var int
*/
const DIMENSION_MAXIMUM_HEIGHT = 300;
/*
* Minimum width images output by the endpoint.
*
* @var int
*/
const DIMENSION_MINIMUM_WIDTH = 1;
/*
* Minimum height images output by the endpoint.
*
* @var int
*/
const DIMENSION_MINIMUM_HEIGHT = 1;
/**
* A list of valid backgrounds.
*
* @return array
* An array of background labels keyed by background.
*/
public static function getBackgrounds();
/**
* Backgrounds mapped to GET values.
*
* @return array
* An array of GET values keyed by background.
*/
public static function getBackgroundsMap();
/**
* Gets the background.
*
* @return string|null
* The background, or NULL for default.
*/
public function getBackground();
/**
* Set the background.
*
* @param string|null $background
* The background to use, or NULL to use default.
*
* @return \Drupal\avatars_robohash\RobohashInterface
* Returns the called Robohash object for chaining.
*/
public function setBackground($background = NULL);
/**
* Avatar types mapped to GET values.
*
* @return array
* An array of GET values keyed by type.
*/
public static function getTypesMap();
/**
* Sets type to random.
*
* Will not be random for each request, rather for each identifier.
*
* @return \Drupal\avatars_robohash\RobohashInterface
* Returns the called Robohash object for chaining.
*/
public function setTypeRandom();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RobohashInterface:: |
constant | |||
RobohashInterface:: |
constant | |||
RobohashInterface:: |
constant | |||
RobohashInterface:: |
constant | |||
RobohashInterface:: |
public | function | Gets the background. | 1 |
RobohashInterface:: |
public static | function | A list of valid backgrounds. | 1 |
RobohashInterface:: |
public static | function | Backgrounds mapped to GET values. | 1 |
RobohashInterface:: |
public static | function | Avatar types mapped to GET values. | 1 |
RobohashInterface:: |
constant | |||
RobohashInterface:: |
public | function | Set the background. | 1 |
RobohashInterface:: |
public | function | Sets type to random. | 1 |