interface TagsHeaderInterface in Purge 8.3
Describes a plugin that adds and formats a cache tags header on responses.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Core\Plugin\ContainerFactoryPluginInterface
- interface \Drupal\purge\Plugin\Purge\TagsHeader\TagsHeaderInterface
Expanded class hierarchy of TagsHeaderInterface
All classes that implement TagsHeaderInterface
3 files declare their use of TagsHeaderInterface
- ATagsHeader.php in tests/
modules/ purge_tagsheader_test/ src/ Plugin/ Purge/ TagsHeader/ ATagsHeader.php - BTagsHeader.php in tests/
modules/ purge_tagsheader_test/ src/ Plugin/ Purge/ TagsHeader/ BTagsHeader.php - CTagsHeader.php in tests/
modules/ purge_tagsheader_test/ src/ Plugin/ Purge/ TagsHeader/ CTagsHeader.php
File
- src/
Plugin/ Purge/ TagsHeader/ TagsHeaderInterface.php, line 11
Namespace
Drupal\purge\Plugin\Purge\TagsHeaderView source
interface TagsHeaderInterface extends PluginInspectionInterface, ContainerFactoryPluginInterface {
/**
* Fetch the HTTP response header name.
*
* @warning
* In RFC #6648 the use of 'X-' as header prefixes has been deprecated
* for "application protocols", this naturally includes Drupal. Therefore
* if this is possible, consider header names without this prefix.
*
* @throws \LogicException
* Thrown when the returned value isn't a string.
*
* @see \Drupal\purge\Annotation\PurgeTagsHeader::$header_name
* @see http://tools.ietf.org/html/rfc6648
*
* @return string
* Name of the HTTP header to send out on responses.
*/
public function getHeaderName();
/**
* Format the given cache tags for the header value representation.
*
* @param string[] $tags
* A set of cache tags.
*
* @throws \LogicException
* Thrown when the returned value isn't a string.
*
* @see \Drupal\Core\Cache\CacheableDependencyInterface::getCacheTags()
*
* @return string
* String representing the given headers.
*/
public function getValue(array $tags);
/**
* Determine if this header should be added to the response.
*
* @return bool
* TRUE when the header should be added to responses, FALSE when not.
*/
public function isEnabled();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ContainerFactoryPluginInterface:: |
public static | function | Creates an instance of the plugin. | 112 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
TagsHeaderInterface:: |
public | function | Fetch the HTTP response header name. | 1 |
TagsHeaderInterface:: |
public | function | Format the given cache tags for the header value representation. | 1 |
TagsHeaderInterface:: |
public | function | Determine if this header should be added to the response. | 1 |