Skip to content

Commit 7dcbcbe

Browse files
committed
[HttpFoundation] tagged public @api
1 parent 311d691 commit 7dcbcbe

16 files changed

+464
-0
lines changed

src/Symfony/Component/HttpFoundation/Cookie.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* Represents a cookie
1616
*
1717
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
18+
*
19+
* @api
1820
*/
1921
class Cookie
2022
{
@@ -36,6 +38,8 @@ class Cookie
3638
* @param string $domain The domain that the cookie is available to
3739
* @param Boolean $secure Whether the cookie should only be transmitted over a secure HTTPS connection from the client
3840
* @param Boolean $httpOnly Whether the cookie will be made accessible only through the HTTP protocol
41+
*
42+
* @api
3943
*/
4044
public function __construct($name, $value = null, $expire = 0, $path = '/', $domain = null, $secure = false, $httpOnly = true)
4145
{
@@ -109,6 +113,8 @@ public function __toString()
109113
* Gets the name of the cookie.
110114
*
111115
* @return string
116+
*
117+
* @api
112118
*/
113119
public function getName()
114120
{
@@ -119,6 +125,8 @@ public function getName()
119125
* Gets the value of the cookie.
120126
*
121127
* @return string
128+
*
129+
* @api
122130
*/
123131
public function getValue()
124132
{
@@ -129,6 +137,8 @@ public function getValue()
129137
* Gets the domain that the cookie is available to.
130138
*
131139
* @return string
140+
*
141+
* @api
132142
*/
133143
public function getDomain()
134144
{
@@ -139,6 +149,8 @@ public function getDomain()
139149
* Gets the time the cookie expires.
140150
*
141151
* @return integer
152+
*
153+
* @api
142154
*/
143155
public function getExpiresTime()
144156
{
@@ -149,6 +161,8 @@ public function getExpiresTime()
149161
* Gets the path on the server in which the cookie will be available on.
150162
*
151163
* @return string
164+
*
165+
* @api
152166
*/
153167
public function getPath()
154168
{
@@ -159,6 +173,8 @@ public function getPath()
159173
* Checks whether the cookie should only be transmitted over a secure HTTPS connection from the client.
160174
*
161175
* @return Boolean
176+
*
177+
* @api
162178
*/
163179
public function isSecure()
164180
{
@@ -169,6 +185,8 @@ public function isSecure()
169185
* Checks whether the cookie will be made accessible only through the HTTP protocol.
170186
*
171187
* @return Boolean
188+
*
189+
* @api
172190
*/
173191
public function isHttpOnly()
174192
{
@@ -179,6 +197,8 @@ public function isHttpOnly()
179197
* Whether this cookie is about to be cleared
180198
*
181199
* @return Boolean
200+
*
201+
* @api
182202
*/
183203
public function isCleared()
184204
{

src/Symfony/Component/HttpFoundation/File/File.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* A file in the file system.
2020
*
2121
* @author Bernhard Schussek <bernhard.schussek@symfony.com>
22+
*
23+
* @api
2224
*/
2325
class File extends \SplFileInfo
2426
{
@@ -446,6 +448,8 @@ class File extends \SplFileInfo
446448
* @param string $path The path to the file
447449
*
448450
* @throws FileNotFoundException If the given path is not a file
451+
*
452+
* @api
449453
*/
450454
public function __construct($path)
451455
{
@@ -462,6 +466,8 @@ public function __construct($path)
462466
* If the mime type is unknown, returns null.
463467
*
464468
* @return string|null The guessed extension or null if it cannot be guessed
469+
*
470+
* @api
465471
*/
466472
public function guessExtension()
467473
{
@@ -478,6 +484,8 @@ public function guessExtension()
478484
* is available on the current operating system.
479485
*
480486
* @return string|null The guessed mime type (i.e. "application/pdf")
487+
*
488+
* @api
481489
*/
482490
public function getMimeType()
483491
{
@@ -492,6 +500,8 @@ public function getMimeType()
492500
* \SplFileInfo::getExtension() is not available before PHP 5.3.6
493501
*
494502
* @return string The extension
503+
*
504+
* @api
495505
*/
496506
public function getExtension()
497507
{
@@ -507,6 +517,8 @@ public function getExtension()
507517
* @return File A File object representing the new file
508518
*
509519
* @throws FileException if the target file could not be created
520+
*
521+
* @api
510522
*/
511523
public function move($directory, $name = null)
512524
{

src/Symfony/Component/HttpFoundation/File/UploadedFile.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* @author Bernhard Schussek <bernhard.schussek@symfony.com>
2121
* @author Florian Eckerstorfer <florian@eckerstorfer.org>
2222
* @author Fabien Potencier <fabien@symfony.com>
23+
*
24+
* @api
2325
*/
2426
class UploadedFile extends File
2527
{
@@ -83,6 +85,8 @@ class UploadedFile extends File
8385
*
8486
* @throws FileException If file_uploads is disabled
8587
* @throws FileNotFoundException If the file does not exist
88+
*
89+
* @api
8690
*/
8791
public function __construct($path, $originalName, $mimeType = null, $size = null, $error = null, $test = false)
8892
{
@@ -108,6 +112,8 @@ public function __construct($path, $originalName, $mimeType = null, $size = null
108112
* Then is should not be considered as a safe value.
109113
*
110114
* @return string|null The original name
115+
*
116+
* @api
111117
*/
112118
public function getClientOriginalName()
113119
{
@@ -121,6 +127,8 @@ public function getClientOriginalName()
121127
* Then is should not be considered as a safe value.
122128
*
123129
* @return string|null The mime type
130+
*
131+
* @api
124132
*/
125133
public function getClientMimeType()
126134
{
@@ -134,6 +142,8 @@ public function getClientMimeType()
134142
* Then is should not be considered as a safe value.
135143
*
136144
* @return integer|null The file size
145+
*
146+
* @api
137147
*/
138148
public function getClientSize()
139149
{
@@ -147,6 +157,8 @@ public function getClientSize()
147157
* Otherwise one of the other UPLOAD_ERR_XXX constants is returned.
148158
*
149159
* @return integer The upload error
160+
*
161+
* @api
150162
*/
151163
public function getError()
152164
{
@@ -157,6 +169,8 @@ public function getError()
157169
* Returns whether the file was uploaded successfully.
158170
*
159171
* @return Boolean True if no error occurred during uploading
172+
*
173+
* @api
160174
*/
161175
public function isValid()
162176
{
@@ -172,6 +186,8 @@ public function isValid()
172186
* @return File A File object representing the new file
173187
*
174188
* @throws FileException if the file has not been uploaded via Http
189+
*
190+
* @api
175191
*/
176192
public function move($directory, $name = null)
177193
{

src/Symfony/Component/HttpFoundation/FileBag.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*
1919
* @author Fabien Potencier <fabien@symfony.com>
2020
* @author Bulat Shakirzyanov <mallluhuct@gmail.com>
21+
*
22+
* @api
2123
*/
2224
class FileBag extends ParameterBag
2325
{
@@ -27,6 +29,8 @@ class FileBag extends ParameterBag
2729
* Constructor.
2830
*
2931
* @param array $parameters An array of HTTP files
32+
*
33+
* @api
3034
*/
3135
public function __construct(array $parameters = array())
3236
{
@@ -36,6 +40,8 @@ public function __construct(array $parameters = array())
3640
/**
3741
* (non-PHPdoc)
3842
* @see Symfony\Component\HttpFoundation\ParameterBag::replace()
43+
*
44+
* @api
3945
*/
4046
public function replace(array $files = array())
4147
{
@@ -46,6 +52,8 @@ public function replace(array $files = array())
4652
/**
4753
* (non-PHPdoc)
4854
* @see Symfony\Component\HttpFoundation\ParameterBag::set()
55+
*
56+
* @api
4957
*/
5058
public function set($key, $value)
5159
{
@@ -57,6 +65,8 @@ public function set($key, $value)
5765
/**
5866
* (non-PHPdoc)
5967
* @see Symfony\Component\HttpFoundation\ParameterBag::add()
68+
*
69+
* @api
6070
*/
6171
public function add(array $files = array())
6272
{

src/Symfony/Component/HttpFoundation/HeaderBag.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* HeaderBag is a container for HTTP headers.
1616
*
1717
* @author Fabien Potencier <fabien@symfony.com>
18+
*
19+
* @api
1820
*/
1921
class HeaderBag
2022
{
@@ -25,6 +27,8 @@ class HeaderBag
2527
* Constructor.
2628
*
2729
* @param array $headers An array of HTTP headers
30+
*
31+
* @api
2832
*/
2933
public function __construct(array $headers = array())
3034
{
@@ -66,6 +70,8 @@ public function __toString()
6670
* Returns the headers.
6771
*
6872
* @return array An array of headers
73+
*
74+
* @api
6975
*/
7076
public function all()
7177
{
@@ -76,6 +82,8 @@ public function all()
7682
* Returns the parameter keys.
7783
*
7884
* @return array An array of parameter keys
85+
*
86+
* @api
7987
*/
8088
public function keys()
8189
{
@@ -86,6 +94,8 @@ public function keys()
8694
* Replaces the current HTTP headers by a new set.
8795
*
8896
* @param array $headers An array of HTTP headers
97+
*
98+
* @api
8999
*/
90100
public function replace(array $headers = array())
91101
{
@@ -97,6 +107,8 @@ public function replace(array $headers = array())
97107
* Adds new headers the current HTTP headers set.
98108
*
99109
* @param array $headers An array of HTTP headers
110+
*
111+
* @api
100112
*/
101113
public function add(array $headers)
102114
{
@@ -113,6 +125,8 @@ public function add(array $headers)
113125
* @param Boolean $first Whether to return the first value or all header values
114126
*
115127
* @return string|array The first header value if $first is true, an array of values otherwise
128+
*
129+
* @api
116130
*/
117131
public function get($key, $default = null, $first = true)
118132
{
@@ -139,6 +153,8 @@ public function get($key, $default = null, $first = true)
139153
* @param string $key The key
140154
* @param string|array $values The value or an array of values
141155
* @param Boolean $replace Whether to replace the actual value of not (true by default)
156+
*
157+
* @api
142158
*/
143159
public function set($key, $values, $replace = true)
144160
{
@@ -163,6 +179,8 @@ public function set($key, $values, $replace = true)
163179
* @param string $key The HTTP header
164180
*
165181
* @return Boolean true if the parameter exists, false otherwise
182+
*
183+
* @api
166184
*/
167185
public function has($key)
168186
{
@@ -176,6 +194,8 @@ public function has($key)
176194
* @param string $value The HTTP value
177195
*
178196
* @return Boolean true if the value is contained in the header, false otherwise
197+
*
198+
* @api
179199
*/
180200
public function contains($key, $value)
181201
{
@@ -186,6 +206,8 @@ public function contains($key, $value)
186206
* Removes a header.
187207
*
188208
* @param string $key The HTTP header name
209+
*
210+
* @api
189211
*/
190212
public function remove($key)
191213
{
@@ -205,6 +227,8 @@ public function remove($key)
205227
* @param \DateTime $default The default value
206228
*
207229
* @return \DateTime The filtered value
230+
*
231+
* @api
208232
*/
209233
public function getDate($key, \DateTime $default = null)
210234
{

0 commit comments

Comments
 (0)