__construct() public method

Constructor.
public __construct ( array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], string | resource $content = null )
$query array The GET parameters
$request array The POST parameters
$attributes array The request attributes (parameters parsed from the PATH_INFO, ...)
$cookies array The COOKIE parameters
$files array The FILES parameters
$server array The SERVER parameters
$content string | resource The raw body data
Ejemplo n.º 1
0
 public function __construct(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null)
 {
     parent::__construct($query, $request, $attributes, $cookies, $files, $server, $content);
     $this->runMultiLanguage();
     $this->runPathBinding();
     $this->loadTrustedProxies();
 }
 /**
  * @param Request $originalRequest
  * @param string  $pagePath
  * @param integer $pageDefaultValue
  * @param string  $maxResultsPath
  * @param integer $maxResultsDefaultValue
  *
  * @return PaginatedRequest
  */
 public function __construct(Request $originalRequest, $pagePath, $pageDefaultValue, $maxResultsPath, $maxResultsDefaultValue)
 {
     parent::__construct($originalRequest->query->all(), $originalRequest->request->all(), $originalRequest->attributes->all(), $originalRequest->cookies->all(), $originalRequest->files->all(), $originalRequest->server->all(), $originalRequest->getContent());
     $this->pagePath = $pagePath;
     $this->pageDefaultValue = $pageDefaultValue;
     $this->maxResultsPath = $maxResultsPath;
     $this->maxResultsDefaultValue = $maxResultsDefaultValue;
 }
Ejemplo n.º 3
0
 /**
  * Constructor
  *
  * @param \src\request\request_interface $src_request
  */
 public function __construct(\src\request\request_interface $src_request)
 {
     $get_parameters = $src_request->get_super_global(\src\request\request_interface::GET);
     $post_parameters = $src_request->get_super_global(\src\request\request_interface::POST);
     $server_parameters = $src_request->get_super_global(\src\request\request_interface::SERVER);
     $files_parameters = $src_request->get_super_global(\src\request\request_interface::FILES);
     $cookie_parameters = $src_request->get_super_global(\src\request\request_interface::COOKIE);
     parent::__construct($get_parameters, $post_parameters, array(), $cookie_parameters, $files_parameters, $server_parameters);
 }
Ejemplo n.º 4
0
 /**
  * Constructor.
  * 
  * Automatically translates JSON raw post data into post parameters.
  */
 public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
 {
     parent::__construct($query, $request, $attributes, $cookies, $files, $server, $content);
     $rawPost = $this->getContent();
     if (!empty($rawPost)) {
         if (stripos($this->headers->get('Content-Type'), 'application/json') === 0) {
             $post = json_decode($rawPost, true);
             if ($post && is_array($post)) {
                 $this->request->add($post);
             }
         }
     }
 }
Ejemplo n.º 5
0
 public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
 {
     parent::__construct($query, $request, $attributes, $cookies, $files, $server, $content);
 }
Ejemplo n.º 6
0
 /**
  * @param BaseRequest $request
  */
 public function __construct(BaseRequest $request)
 {
     parent::__construct(iterator_to_array($request->query), iterator_to_array($request->request), iterator_to_array($request->attributes), iterator_to_array($request->cookies), iterator_to_array($request->files), iterator_to_array($request->server), $request->getContent());
 }
Ejemplo n.º 7
0
 /**
  * @inheritdoc
  */
 public function __construct(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null)
 {
     parent::__construct($query, $request, $attributes, $cookies, $files, $server, $content);
     $this->setLocale($this->getPreferredLanguage());
 }
Ejemplo n.º 8
0
 /**
  * The constructor. Sets up a standard request.
  */
 public function __construct()
 {
     //setup the standard request.
     parent::__construct($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER);
 }
 /**
  * @param array $attributes
  * @param array $content
  */
 public function __construct(array $attributes, $content)
 {
     parent::__construct();
     $this->attributes = new ParameterBag($attributes);
     $this->content = $content;
 }
Ejemplo n.º 10
0
 public function __construct()
 {
     parent::__construct($_GET, $_POST, array(), $_COOKIE, $_FILES, $_SERVER);
 }
Ejemplo n.º 11
0
 /**
  * MockTokenRequest constructor.
  * @param $serialisedToken
  */
 public function __construct($serialisedToken)
 {
     parent::__construct();
     $this->headers->set('Authorization', $serialisedToken);
 }
Ejemplo n.º 12
0
 /**
  * Constructor.
  *
  * HTTP method overriding using the special `_method` parameter is enabled
  * by default in our Request object.
  *
  * @see \Symfony\Component\HttpFoundation\Request::__construct
  * @see \Symfony\Component\HttpFoundation\Request::enableHttpMethodParameterOverride
  */
 public function __construct(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
 {
     parent::__construct($query, $request, $attributes, $cookies, $files, $server, $content);
     self::enableHttpMethodParameterOverride();
 }
Ejemplo n.º 13
0
 /**
  * @TODO: remove dependency from Request object?
  *
  * @param Request $request source request
  * @param string $media
  */
 public function __construct(Request $request, $media = TemplateLayout::MEDIA_SCREEN)
 {
     parent::__construct($request->query->all(), $request->request->all(), $request->attributes->all(), $request->cookies->all(), $request->files->all(), $request->server->all(), $request->content);
     $this->setDefaultLocale($request->getLocale());
     $this->media = $media;
 }
 /**
  */
 function __construct()
 {
     parent::__construct();
     $this->attributes = new ParameterBag([RequestMeta::ATTRIBUTE_URI => '/uri']);
 }