You are here

public function AcquiaPlatformCdnTagsHeader::getHeaderName in Acquia Purge 8

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 TagsHeaderBase::getHeaderName

See also

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

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

File

src/Plugin/Purge/TagsHeader/AcquiaPlatformCdnTagsHeader.php, line 74

Class

AcquiaPlatformCdnTagsHeader
Exports a tags header for the current Platform CDN backend.

Namespace

Drupal\acquia_purge\Plugin\Purge\TagsHeader

Code

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