You are here

public function TagsHeaderBase::getHeaderName in Purge 8.3

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.

Return value

string Name of the HTTP header to send out on responses.

Throws

\LogicException Thrown when the returned value isn't a string.

Overrides TagsHeaderInterface::getHeaderName

See also

\Drupal\purge\Annotation\PurgeTagsHeader::$header_name

http://tools.ietf.org/html/rfc6648

File

src/Plugin/Purge/TagsHeader/TagsHeaderBase.php, line 27

Class

TagsHeaderBase
Base implementation for plugins that add and format a cache tags header.

Namespace

Drupal\purge\Plugin\Purge\TagsHeader

Code

public function getHeaderName() {
  return $this
    ->getPluginDefinition()['header_name'];
}