You are here

class SanitizerTestRequest in Drupal 7

Basic HTTP Request class.

Hierarchy

Expanded class hierarchy of SanitizerTestRequest

File

modules/simpletest/tests/request_sanitizer.test, line 277
Tests for the RequestSanitizer class.

View source
class SanitizerTestRequest {

  /**
   * The query (GET).
   *
   * @var array
   */
  protected $query;

  /**
   * The request (POST).
   *
   * @var array
   */
  protected $request;

  /**
   * The request attributes.
   *
   * @var array
   */
  protected $attributes;

  /**
   * The request cookies.
   *
   * @var array
   */
  protected $cookies;

  /**
   * Constructor.
   *
   * @param array $query
   *   The GET parameters.
   * @param array $request
   *   The POST parameters.
   * @param array $attributes
   *   The request attributes.
   * @param array $cookies
   *   The COOKIE parameters.
   */
  public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array()) {
    $this->query = $query;
    $this->request = $request;
    $this->attributes = $attributes;
    $this->cookies = $cookies;
  }

  /**
   * Getter for $query.
   */
  public function getQuery() {
    return $this->query;
  }

  /**
   * Getter for $request.
   */
  public function getRequest() {
    return $this->request;
  }

  /**
   * Getter for $attributes.
   */
  public function getAttributes() {
    return $this->attributes;
  }

  /**
   * Getter for $cookies.
   */
  public function getCookies() {
    return $this->cookies;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SanitizerTestRequest::$attributes protected property The request attributes.
SanitizerTestRequest::$cookies protected property The request cookies.
SanitizerTestRequest::$query protected property The query (GET).
SanitizerTestRequest::$request protected property The request (POST).
SanitizerTestRequest::getAttributes public function Getter for $attributes.
SanitizerTestRequest::getCookies public function Getter for $cookies.
SanitizerTestRequest::getQuery public function Getter for $query.
SanitizerTestRequest::getRequest public function Getter for $request.
SanitizerTestRequest::__construct public function Constructor.