You are here

interface TrafficRegistryInterface in URLs queuer 8

Describes a traffic registry with URLs and tags.

Hierarchy

Expanded class hierarchy of TrafficRegistryInterface

All classes that implement TrafficRegistryInterface

3 files declare their use of TrafficRegistryInterface
RegistryCheck.php in src/Plugin/Purge/DiagnosticCheck/RegistryCheck.php
SqlSanitizeCommands.php in src/Commands/SqlSanitizeCommands.php
UrlRegistrar.php in src/StackMiddleware/UrlRegistrar.php

File

src/TrafficRegistryInterface.php, line 11

Namespace

Drupal\purge_queuer_url
View source
interface TrafficRegistryInterface extends ServiceProviderInterface, ServiceModifierInterface {

  /**
   * Register a new URL or path with its associated cache tags at the registry.
   *
   * @param string $url_or_path
   *   The URL or path string to register (may already exist).
   * @param string[] $tags
   *   Unassociative array with cache tags associated with the URL or path.
   *
   * @throws \LogicException
   *   Thrown when $tags is empty.
   *
   * @warning
   *   Implementation specific contstraints - such as database field length -
   *   might dismiss the URL being added. Although implementations should
   *   prevent this from happening at all cost, it could happen.
   */
  public function add($url_or_path, array $tags);

  /**
   * Remove a URL or path from the registry.
   *
   * @param string $url_or_path
   *   The URL or path string to remove from the registry.
   */
  public function remove($url_or_path);

  /**
   * Wipe out all gathered traffic information.
   */
  public function clear();

  /**
   * Count the number of URLs in the registry.
   *
   * @return int
   *   Number of URLs currently in the registry.
   */
  public function countUrls();

  /**
   * Collect URLs and paths associated with the given list of tags.
   *
   * @param string[] $tags
   *   Unassociative list of cache tags that belong to one or more URls/paths.
   *
   * @throws \LogicException
   *   Thrown when $tags is empty.
   *
   * @return string[]
   *   Returns an array with URLs/paths associated with the tags.
   */
  public function getUrls(array $tags);

}

Members

Namesort descending Modifiers Type Description Overrides
ServiceModifierInterface::alter public function Modifies existing service definitions. 13
ServiceProviderInterface::register public function Registers services to the container. 14
TrafficRegistryInterface::add public function Register a new URL or path with its associated cache tags at the registry. 1
TrafficRegistryInterface::clear public function Wipe out all gathered traffic information. 1
TrafficRegistryInterface::countUrls public function Count the number of URLs in the registry. 1
TrafficRegistryInterface::getUrls public function Collect URLs and paths associated with the given list of tags. 1
TrafficRegistryInterface::remove public function Remove a URL or path from the registry. 1