You are here

interface InvalidationsServiceInterface in Purge 8.3

Describes a service that instantiates invalidation objects on-demand.

Hierarchy

Expanded class hierarchy of InvalidationsServiceInterface

All classes that implement InvalidationsServiceInterface

7 files declare their use of InvalidationsServiceInterface
CacheTagsQueuerTest.php in modules/purge_queuer_coretags/tests/src/Unit/CacheTagsQueuerTest.php
DashboardController.php in modules/purge_ui/src/Controller/DashboardController.php
InvalidateCommand.php in modules/purge_drush/src/Commands/InvalidateCommand.php
PurgeBlockForm.php in modules/purge_ui/src/Form/PurgeBlockForm.php
QueueCommands.php in modules/purge_drush/src/Commands/QueueCommands.php

... See full list

File

src/Plugin/Purge/Invalidation/InvalidationsServiceInterface.php, line 10

Namespace

Drupal\purge\Plugin\Purge\Invalidation
View source
interface InvalidationsServiceInterface extends ServiceInterface {

  /**
   * Create a new invalidation object of the given type.
   *
   * @param string $plugin_id
   *   The id of the invalidation type being instantiated.
   * @param mixed|null $expression
   *   Value - usually string - that describes the kind of invalidation, NULL
   *   when the type of invalidation doesn't require $expression. Types usually
   *   validate the given expression and throw exceptions for bad input.
   *
   * @throws \Drupal\purge\Plugin\Purge\Invalidation\Exception\MissingExpressionException
   *   Thrown when plugin defined expression_required = TRUE and when it is
   *   instantiated without expression (NULL).
   * @throws \Drupal\purge\Plugin\Purge\Invalidation\Exception\InvalidExpressionException
   *   Exception thrown when plugin got instantiated with an expression that is
   *   not deemed valid for the type of invalidation.
   * @throws \Drupal\purge\Plugin\Purge\Invalidation\Exception\TypeUnsupportedException
   *   Thrown when no purgers support the requested type.
   *
   * @return \Drupal\purge\Plugin\Purge\Invalidation\InvalidationInterface
   *   The invalidation object.
   */
  public function get($plugin_id, $expression = NULL);

  /**
   * Create a new immutable invalidation object of the given type.
   *
   * @param string $plugin_id
   *   The id of the invalidation type being instantiated.
   * @param mixed|null $expression
   *   Value - usually string - that describes the kind of invalidation, NULL
   *   when the type of invalidation doesn't require $expression. Types usually
   *   validate the given expression and throw exceptions for bad input.
   *
   * @throws \Drupal\purge\Plugin\Purge\Invalidation\Exception\MissingExpressionException
   *   Thrown when plugin defined expression_required = TRUE and when it is
   *   instantiated without expression (NULL).
   * @throws \Drupal\purge\Plugin\Purge\Invalidation\Exception\InvalidExpressionException
   *   Exception thrown when plugin got instantiated with an expression that is
   *   not deemed valid for the type of invalidation.
   *
   * @return \Drupal\purge\Plugin\Purge\Invalidation\ImmutableInvalidationInterface
   *   The immutable invalidation object.
   */
  public function getImmutable($plugin_id, $expression = NULL);

  /**
   * Replicate a invalidation object from serialized queue item data.
   *
   * @param string $item_data
   *   Arbitrary PHP data structured that was stored into the queue.
   *
   * @throws \Drupal\purge\Plugin\Purge\Invalidation\Exception\MissingExpressionException
   *   Thrown when plugin defined expression_required = TRUE and when it is
   *   instantiated without expression (NULL).
   * @throws \Drupal\purge\Plugin\Purge\Invalidation\Exception\InvalidExpressionException
   *   Exception thrown when plugin got instantiated with an expression that is
   *   not deemed valid for the type of invalidation.
   *
   * @return \Drupal\purge\Plugin\Purge\Invalidation\InvalidationInterface
   *   The invalidation object.
   */
  public function getFromQueueData($item_data);

  /**
   * Replicate a immutable invalidation object from serialized queue item data.
   *
   * @param string $item_data
   *   Arbitrary PHP data structured that was stored into the queue.
   *
   * @throws \Drupal\purge\Plugin\Purge\Invalidation\Exception\MissingExpressionException
   *   Thrown when plugin defined expression_required = TRUE and when it is
   *   instantiated without expression (NULL).
   * @throws \Drupal\purge\Plugin\Purge\Invalidation\Exception\InvalidExpressionException
   *   Exception thrown when plugin got instantiated with an expression that is
   *   not deemed valid for the type of invalidation.
   *
   * @return \Drupal\purge\Plugin\Purge\Invalidation\ImmutableInvalidationInterface
   *   The immutable invalidation object.
   */
  public function getImmutableFromQueueData($item_data);

}

Members

Namesort descending Modifiers Type Description Overrides
InvalidationsServiceInterface::get public function Create a new invalidation object of the given type. 1
InvalidationsServiceInterface::getFromQueueData public function Replicate a invalidation object from serialized queue item data. 1
InvalidationsServiceInterface::getImmutable public function Create a new immutable invalidation object of the given type. 1
InvalidationsServiceInterface::getImmutableFromQueueData public function Replicate a immutable invalidation object from serialized queue item data. 1
ServiceInterface::getPlugins public function Retrieve a list of all available plugins providing the service. 1
ServiceInterface::getPluginsEnabled public function Retrieve the configured plugin_ids that the service will use. 1
ServiceInterface::isPluginEnabled public function Find out whether the given plugin_id is enabled. 1
ServiceInterface::reload public function Reload the service and reinstantiate all enabled plugins. 1
ServiceModifierInterface::alter public function Modifies existing service definitions. 13
ServiceProviderInterface::register public function Registers services to the container. 14