d78868e539022f3ba92f144c60346fdd4e05d479
[yaffs-website] / vendor / symfony / browser-kit / Request.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\BrowserKit;
13
14 /**
15  * @author Fabien Potencier <fabien@symfony.com>
16  */
17 class Request
18 {
19     protected $uri;
20     protected $method;
21     protected $parameters;
22     protected $files;
23     protected $cookies;
24     protected $server;
25     protected $content;
26
27     /**
28      * @param string $uri        The request URI
29      * @param string $method     The HTTP method request
30      * @param array  $parameters The request parameters
31      * @param array  $files      An array of uploaded files
32      * @param array  $cookies    An array of cookies
33      * @param array  $server     An array of server parameters
34      * @param string $content    The raw body data
35      */
36     public function __construct($uri, $method, array $parameters = array(), array $files = array(), array $cookies = array(), array $server = array(), $content = null)
37     {
38         $this->uri = $uri;
39         $this->method = $method;
40         $this->parameters = $parameters;
41         $this->files = $files;
42         $this->cookies = $cookies;
43         $this->server = $server;
44         $this->content = $content;
45     }
46
47     /**
48      * Gets the request URI.
49      *
50      * @return string The request URI
51      */
52     public function getUri()
53     {
54         return $this->uri;
55     }
56
57     /**
58      * Gets the request HTTP method.
59      *
60      * @return string The request HTTP method
61      */
62     public function getMethod()
63     {
64         return $this->method;
65     }
66
67     /**
68      * Gets the request parameters.
69      *
70      * @return array The request parameters
71      */
72     public function getParameters()
73     {
74         return $this->parameters;
75     }
76
77     /**
78      * Gets the request server files.
79      *
80      * @return array The request files
81      */
82     public function getFiles()
83     {
84         return $this->files;
85     }
86
87     /**
88      * Gets the request cookies.
89      *
90      * @return array The request cookies
91      */
92     public function getCookies()
93     {
94         return $this->cookies;
95     }
96
97     /**
98      * Gets the request server parameters.
99      *
100      * @return array The request server parameters
101      */
102     public function getServer()
103     {
104         return $this->server;
105     }
106
107     /**
108      * Gets the request raw body data.
109      *
110      * @return string The request raw body data
111      */
112     public function getContent()
113     {
114         return $this->content;
115     }
116 }