You are here

class ServerRequest in Zircon Profile 8

Same name in this branch
  1. 8 vendor/zendframework/zend-diactoros/src/ServerRequest.php \Zend\Diactoros\ServerRequest
  2. 8 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/ServerRequest.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\ServerRequest
Same name and namespace in other branches
  1. 8.0 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/ServerRequest.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\ServerRequest

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

Hierarchy

Expanded class hierarchy of ServerRequest

1 file declares its use of ServerRequest
HttpFoundationFactoryTest.php in vendor/symfony/psr-http-message-bridge/Tests/Factory/HttpFoundationFactoryTest.php

File

vendor/symfony/psr-http-message-bridge/Tests/Fixtures/ServerRequest.php, line 21

Namespace

Symfony\Bridge\PsrHttpMessage\Tests\Fixtures
View source
class ServerRequest extends Message implements ServerRequestInterface {
  private $requestTarget;
  private $method;
  private $uri;
  private $server;
  private $cookies;
  private $query;
  private $uploadedFiles;
  private $data;
  private $attributes;
  public function __construct($version = '1.1', array $headers = array(), StreamInterface $body = null, $requestTarget = '/', $method = 'GET', $uri = null, array $server = array(), array $cookies = array(), array $query = array(), array $uploadedFiles = array(), $data = null, array $attributes = array()) {
    parent::__construct($version, $headers, $body);
    $this->requestTarget = $requestTarget;
    $this->method = $method;
    $this->uri = $uri;
    $this->server = $server;
    $this->cookies = $cookies;
    $this->query = $query;
    $this->uploadedFiles = $uploadedFiles;
    $this->data = $data;
    $this->attributes = $attributes;
  }
  public function getRequestTarget() {
    return $this->requestTarget;
  }
  public function withRequestTarget($requestTarget) {
    throw new \BadMethodCallException('Not implemented.');
  }
  public function getMethod() {
    return $this->method;
  }
  public function withMethod($method) {
  }
  public function getUri() {
    return $this->uri;
  }
  public function withUri(UriInterface $uri, $preserveHost = false) {
    throw new \BadMethodCallException('Not implemented.');
  }
  public function getServerParams() {
    return $this->server;
  }
  public function getCookieParams() {
    return $this->cookies;
  }
  public function withCookieParams(array $cookies) {
    throw new \BadMethodCallException('Not implemented.');
  }
  public function getQueryParams() {
    return $this->query;
  }
  public function withQueryParams(array $query) {
    throw new \BadMethodCallException('Not implemented.');
  }
  public function getUploadedFiles() {
    return $this->uploadedFiles;
  }
  public function withUploadedFiles(array $uploadedFiles) {
    throw new \BadMethodCallException('Not implemented.');
  }
  public function getParsedBody() {
    return $this->data;
  }
  public function withParsedBody($data) {
    throw new \BadMethodCallException('Not implemented.');
  }
  public function getAttributes() {
    return $this->attributes;
  }
  public function getAttribute($name, $default = null) {
    return isset($this->attributes[$name]) ? $this->attributes[$name] : $default;
  }
  public function withAttribute($name, $value) {
    throw new \BadMethodCallException('Not implemented.');
  }
  public function withoutAttribute($name) {
    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
ServerRequest::$attributes private property
ServerRequest::$cookies private property
ServerRequest::$data private property
ServerRequest::$method private property
ServerRequest::$query private property
ServerRequest::$requestTarget private property
ServerRequest::$server private property
ServerRequest::$uploadedFiles private property
ServerRequest::$uri private property
ServerRequest::getAttribute public function Retrieve a single derived request attribute. Overrides ServerRequestInterface::getAttribute
ServerRequest::getAttributes public function Retrieve attributes derived from the request. Overrides ServerRequestInterface::getAttributes
ServerRequest::getCookieParams public function Retrieve cookies. Overrides ServerRequestInterface::getCookieParams
ServerRequest::getMethod public function Retrieves the HTTP method of the request. Overrides RequestInterface::getMethod
ServerRequest::getParsedBody public function Retrieve any parameters provided in the request body. Overrides ServerRequestInterface::getParsedBody
ServerRequest::getQueryParams public function Retrieve query string arguments. Overrides ServerRequestInterface::getQueryParams
ServerRequest::getRequestTarget public function Retrieves the message's request target. Overrides RequestInterface::getRequestTarget
ServerRequest::getServerParams public function Retrieve server parameters. Overrides ServerRequestInterface::getServerParams
ServerRequest::getUploadedFiles public function Retrieve normalized file upload data. Overrides ServerRequestInterface::getUploadedFiles
ServerRequest::getUri public function Retrieves the URI instance. Overrides RequestInterface::getUri
ServerRequest::withAttribute public function Return an instance with the specified derived request attribute. Overrides ServerRequestInterface::withAttribute
ServerRequest::withCookieParams public function Return an instance with the specified cookies. Overrides ServerRequestInterface::withCookieParams
ServerRequest::withMethod public function Return an instance with the provided HTTP method. Overrides RequestInterface::withMethod
ServerRequest::withoutAttribute public function Return an instance that removes the specified derived request attribute. Overrides ServerRequestInterface::withoutAttribute
ServerRequest::withParsedBody public function Return an instance with the specified body parameters. Overrides ServerRequestInterface::withParsedBody
ServerRequest::withQueryParams public function Return an instance with the specified query string arguments. Overrides ServerRequestInterface::withQueryParams
ServerRequest::withRequestTarget public function Return an instance with the specific request-target. Overrides RequestInterface::withRequestTarget
ServerRequest::withUploadedFiles public function Create a new instance with the specified uploaded files. Overrides ServerRequestInterface::withUploadedFiles
ServerRequest::withUri public function Returns an instance with the provided URI. Overrides RequestInterface::withUri
ServerRequest::__construct public function Overrides Message::__construct