Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AcceptHeaderItem.php

function AcceptHeaderItem::setAttribute

Set an attribute.

Return value

$this

1 call to AcceptHeaderItem::setAttribute()
AcceptHeaderItem::__construct in vendor/symfony/http-foundation/AcceptHeaderItem.php

File

vendor/symfony/http-foundation/AcceptHeaderItem.php, line 149

Class

AcceptHeaderItem
Represents an Accept-* header item.

Namespace

Symfony\Component\HttpFoundation

Code

public function setAttribute(string $name, string $value) : static {
    if ('q' === $name) {
        $this->quality = (double) $value;
    }
    else {
        $this->attributes[$name] = $value;
    }
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal