You are here

class Message in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/zendframework/zend-stdlib/src/Message.php \Zend\Stdlib\Message
  2. 8.0 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Message.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\Message
  3. 8.0 core/modules/contact/src/Entity/Message.php \Drupal\contact\Entity\Message
Same name and namespace in other branches
  1. 8 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Message.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\Message

Message.

@author Kévin Dunglas <dunglas@gmail.com>

Hierarchy

Expanded class hierarchy of Message

17 string references to 'Message'
Abstract2Dot5ApiTest::testNoDuplicateValidationIfClassConstraintInMultipleGroups in vendor/symfony/validator/Tests/Validator/Abstract2Dot5ApiTest.php
Abstract2Dot5ApiTest::testNoDuplicateValidationIfPropertyConstraintInMultipleGroups in vendor/symfony/validator/Tests/Validator/Abstract2Dot5ApiTest.php
Abstract2Dot5ApiTest::testTraversalEnabledOnClass in vendor/symfony/validator/Tests/Validator/Abstract2Dot5ApiTest.php
AbstractValidatorTest::testValidateDifferentObjectsSeparately in vendor/symfony/validator/Tests/Validator/AbstractValidatorTest.php
AbstractValidatorTest::testValidateMultipleGroups in vendor/symfony/validator/Tests/Validator/AbstractValidatorTest.php

... See full list

File

vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Message.php, line 22

Namespace

Symfony\Bridge\PsrHttpMessage\Tests\Fixtures
View source
class Message implements MessageInterface {
  private $version = '1.1';
  private $headers = array();
  private $body;
  public function __construct($version = '1.1', array $headers = array(), StreamInterface $body = null) {
    $this->version = $version;
    $this->headers = $headers;
    $this->body = null === $body ? new Stream() : $body;
  }
  public function getProtocolVersion() {
    return $this->version;
  }
  public function withProtocolVersion($version) {
    throw new \BadMethodCallException('Not implemented.');
  }
  public function getHeaders() {
    return $this->headers;
  }
  public function hasHeader($name) {
    return isset($this->headers[$name]);
  }
  public function getHeader($name) {
    return $this
      ->hasHeader($name) ? $this->headers[$name] : array();
  }
  public function getHeaderLine($name) {
    return $this
      ->hasHeader($name) ? implode(',', $this->headers[$name]) : '';
  }
  public function withHeader($name, $value) {
    throw new \BadMethodCallException('Not implemented.');
  }
  public function withAddedHeader($name, $value) {
    throw new \BadMethodCallException('Not implemented.');
  }
  public function withoutHeader($name) {
    throw new \BadMethodCallException('Not implemented.');
  }
  public function getBody() {
    return $this->body;
  }
  public function withBody(StreamInterface $body) {
    throw new \BadMethodCallException('Not implemented.');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Message::$body private property
Message::$headers private property
Message::$version private property
Message::getBody public function Gets the body of the message. Overrides MessageInterface::getBody
Message::getHeader public function Retrieves a message header value by the given case-insensitive name. Overrides MessageInterface::getHeader
Message::getHeaderLine public function Retrieves a comma-separated string of the values for a single header. Overrides MessageInterface::getHeaderLine
Message::getHeaders public function Retrieves all message header values. Overrides MessageInterface::getHeaders
Message::getProtocolVersion public function Retrieves the HTTP protocol version as a string. Overrides MessageInterface::getProtocolVersion
Message::hasHeader public function Checks if a header exists by the given case-insensitive name. Overrides MessageInterface::hasHeader
Message::withAddedHeader public function Return an instance with the specified header appended with the given value. Overrides MessageInterface::withAddedHeader
Message::withBody public function Return an instance with the specified message body. Overrides MessageInterface::withBody
Message::withHeader public function Return an instance with the provided value replacing the specified header. Overrides MessageInterface::withHeader
Message::withoutHeader public function Return an instance without the specified header. Overrides MessageInterface::withoutHeader
Message::withProtocolVersion public function Return an instance with the specified HTTP protocol version. Overrides MessageInterface::withProtocolVersion
Message::__construct public function 2