You are here

interface CcuClientInterface in Akamai 7.3

Hierarchy

Expanded class hierarchy of CcuClientInterface

All classes that implement CcuClientInterface

1 file declares its use of CcuClientInterface
akamai.admin.inc in ./akamai.admin.inc
Administrative pages for the Akamai module.

File

src/CcuClientInterface.php, line 14
Constains the Drupal\akamai\CcuClientInterface interface.

Namespace

Drupal\akamai
View source
interface CcuClientInterface {

  /**
   * String constant for the production network.
   */
  const NETWORK_PRODUCTION = 'production';

  /**
   * String constant for the staging network.
   */
  const NETWORK_STAGING = 'staging';

  /**
   * The maximum size, in bytes, of a request body allowed by the API.
   */
  const MAX_BODY_SIZE = 50000;

  /**
   * Constructor.
   *
   * @param \Akamai\Open\EdgeGrid\Client $client
   *   An instance of the EdgeGrid HTTP client class.
   */
  public function __construct(EdgeGridClient $client);

  /**
   * Sets the network on which purge requests will be executed.
   *
   * @param string $network
   *   Must be either 'production' or 'staging'.
   */
  public function setNetwork($network);

  /**
   * Sets the operation to use when issuing a purge request.
   *
   * @param string $operation
   *   An operation such as 'invalidate' or 'remove'.
   */
  public function setOperation($operation);

  /**
   * Checks the progress of a purge request.
   *
   * @param string $progress_uri
   *   A URI as provided in response to a purge request.
   */
  public function checkProgress($progress_uri);

  /**
   * Submits a purge request for one or more URLs.
   *
   * @param string $hostname
   *   The name of the URL that contains the objects you want to purge.
   * @param array $paths
   *   An array of paths to be purged.
   */
  public function postPurgeRequest($hostname, array $paths);

  /**
   * Generates the URL to use when posting a purge request.
   *
   * @return string
   *   The URL to use for creating a purge request,
   *   e.g. '/ccu/v3/invalidate/url/production'.
   */
  public function getPurgeApiEndpoint();

  /**
   * Generates a JSON-encoded body for a purge request.
   *
   * @return string
   *   A JSON-encoded object containing 'hostname' and 'objects' properties.
   */
  public function getPurgeBody($hostname, array $paths);

  /**
   * Verifies that the body of a purge request will be under 50,000 bytes.
   *
   * @param string $hostname
   *   The name of the URL that contains the objects you want to purge.
   * @param array $paths
   *   An array of paths to be purged.
   *
   * @return bool
   *   TRUE if the body size is below the limit, otherwise FALSE.
   */
  public function bodyIsBelowLimit($hostname, array $paths);

}

Members

Namesort descending Modifiers Type Description Overrides
CcuClientInterface::bodyIsBelowLimit public function Verifies that the body of a purge request will be under 50,000 bytes. 1
CcuClientInterface::checkProgress public function Checks the progress of a purge request. 1
CcuClientInterface::getPurgeApiEndpoint public function Generates the URL to use when posting a purge request. 2
CcuClientInterface::getPurgeBody public function Generates a JSON-encoded body for a purge request. 2
CcuClientInterface::MAX_BODY_SIZE constant The maximum size, in bytes, of a request body allowed by the API.
CcuClientInterface::NETWORK_PRODUCTION constant String constant for the production network.
CcuClientInterface::NETWORK_STAGING constant String constant for the staging network.
CcuClientInterface::postPurgeRequest public function Submits a purge request for one or more URLs. 1
CcuClientInterface::setNetwork public function Sets the network on which purge requests will be executed. 1
CcuClientInterface::setOperation public function Sets the operation to use when issuing a purge request. 1
CcuClientInterface::__construct public function Constructor. 1