Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1be4a27

Browse files
committed
Merge branch '2.1' into 2.2
2 parentsefd7395 +b0da69a commit1be4a27

File tree

3 files changed

+30
-24
lines changed

3 files changed

+30
-24
lines changed

‎book/forms.rst

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -318,15 +318,18 @@ object.
318318
..code-block::xml
319319
320320
<!-- Acme/TaskBundle/Resources/config/validation.xml-->
321-
<classname="Acme\TaskBundle\Entity\Task">
322-
<propertyname="task">
323-
<constraintname="NotBlank" />
324-
</property>
325-
<propertyname="dueDate">
326-
<constraintname="NotBlank" />
327-
<constraintname="Type">\DateTime</constraint>
328-
</property>
329-
</class>
321+
<?xml version="1.0" charset="UTF-8"?>
322+
<constraint-mappingxmlns="http://symfony.com/schema/dic/constraint-mapping"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
323+
<classname="Acme\TaskBundle\Entity\Task">
324+
<propertyname="task">
325+
<constraintname="NotBlank" />
326+
</property>
327+
<propertyname="dueDate">
328+
<constraintname="NotBlank" />
329+
<constraintname="Type">\DateTime</constraint>
330+
</property>
331+
</class>
332+
<constraint-mapping>
330333
331334
..code-block::php
332335

‎components/console/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ Option Value
260260
=========================== ===============================================================================================================
261261
InputArgument::REQUIRED The argument is required
262262
InputArgument::OPTIONAL The argument is optional and therefore can be omitted
263-
InputArgument::IS_ARRAY The argument cancancontain an indefinite number of arguments and must be used at the end of the argument list
263+
InputArgument::IS_ARRAY The argument can contain an indefinite number of arguments and must be used at the end of the argument list
264264
=========================== ===============================================================================================================
265265

266266
You can combine ``IS_ARRAY`` with ``REQUIRED`` and ``OPTIONAL`` like this::

‎components/http_foundation/introduction.rst

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ You can install the component in 2 different ways:
2727
Request
2828
-------
2929

30-
The most common way to create request is to base it on the current PHP global
30+
The most common way to createarequest is to base it on the current PHP global
3131
variables with
3232
:method:`Symfony\\Component\\HttpFoundation\\Request::createFromGlobals`::
3333

@@ -66,7 +66,7 @@ can be accessed via several public properties:
6666
* ``server``: equivalent of ``$_SERVER``;
6767

6868
* ``headers``: mostly equivalent to a sub-set of ``$_SERVER``
69-
(``$request->headers->get('Content-Type')``).
69+
(``$request->headers->get('User-Agent')``).
7070

7171
Each property is a:class:`Symfony\\Component\\HttpFoundation\\ParameterBag`
7272
instance (or a sub-class of), which is a data holder class:
@@ -128,7 +128,7 @@ has some methods to filter the input values:
128128
parameter value converted to integer;
129129

130130
*:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::filter`: Filters the
131-
parameter by using the PHP``filter_var()`` function.
131+
parameter by using the PHP:phpfunction:`filter_var` function.
132132

133133
All getters takes up to three arguments: the first one is the parameter name
134134
and the second one is the default value to return if the parameter does not
@@ -150,7 +150,7 @@ When PHP imports the request query, it handles request parameters like
150150
``foo[bar]=bar`` in a special way as it creates an array. So you can get the
151151
``foo`` parameter and you will get back an array with a ``bar`` element. But
152152
sometimes, you might want to get the value for the "original" parameter name:
153-
``foo[bar]``. This is possible with all the `ParameterBag` getters like
153+
``foo[bar]``. This is possible with all the ``ParameterBag`` getters like
154154
:method:`Symfony\\Component\\HttpFoundation\\Request::get` via the third
155155
argument::
156156

@@ -172,7 +172,8 @@ thanks to the public ``attributes`` property, which is also an instance of
172172
:class:`Symfony\\Component\\HttpFoundation\\ParameterBag`. This is mostly used
173173
to attach information that belongs to the Request and that needs to be
174174
accessed from many different points in your application. For information
175-
on how this is used in the Symfony2 framework, see:ref:`read more<book-fundamentals-attributes>`.
175+
on how this is used in the Symfony2 framework, see
176+
:ref:`the Symfony2 book<book-fundamentals-attributes>`.
176177

177178
Identifying a Request
178179
~~~~~~~~~~~~~~~~~~~~~
@@ -188,8 +189,8 @@ this is done via the "path info" of the request, which can be accessed via the
188189
Simulating a Request
189190
~~~~~~~~~~~~~~~~~~~~
190191

191-
Instead of creating aRequest based on the PHP globals, you can also simulate
192-
aRequest::
192+
Instead of creating arequest based on the PHP globals, you can also simulate
193+
arequest::
193194

194195
$request = Request::create(
195196
'/hello-world',
@@ -198,7 +199,7 @@ a Request::
198199
);
199200

200201
The:method:`Symfony\\Component\\HttpFoundation\\Request::create` method
201-
creates a request based on apath info, a method and some parameters (the
202+
creates a request based on aURI, a method and some parameters (the
202203
query parameters or the request ones depending on the HTTP method); and of
203204
course, you can also override all other variables as well (by default, Symfony
204205
creates sensible defaults for all the PHP global variables).
@@ -210,19 +211,19 @@ Based on such a request, you can override the PHP global variables via
210211

211212
..tip::
212213

213-
You can also duplicate an existingquery via
214+
You can also duplicate an existingrequest via
214215
:method:`Symfony\\Component\\HttpFoundation\\Request::duplicate` or
215216
change a bunch of parameters with a single call to
216217
:method:`Symfony\\Component\\HttpFoundation\\Request::initialize`.
217218

218219
Accessing the Session
219220
~~~~~~~~~~~~~~~~~~~~~
220221

221-
If you have a session attached to theRequest, you can access it via the
222+
If you have a session attached to therequest, you can access it via the
222223
:method:`Symfony\\Component\\HttpFoundation\\Request::getSession` method;
223224
the
224225
:method:`Symfony\\Component\\HttpFoundation\\Request::hasPreviousSession`
225-
method tells you if the request contains aSession which was started in one of
226+
method tells you if the request contains asession which was started in one of
226227
the previous requests.
227228

228229
Accessing `Accept-*` Headers Data
@@ -238,7 +239,7 @@ by using the following methods:
238239
returns the list of accepted languages ordered by descending quality;
239240

240241
*:method:`Symfony\\Component\\HttpFoundation\\Request::getCharsets`:
241-
returns the list of accepted charsets ordered by descending quality;
242+
returns the list of accepted charsets ordered by descending quality.
242243

243244
..versionadded::2.2
244245
The:class:`Symfony\\Component\\HttpFoundation\\AcceptHeader` class is new in Symfony 2.2.
@@ -262,8 +263,10 @@ If you need to get full access to parsed data from ``Accept``, ``Accept-Language
262263
Accessing other Data
263264
~~~~~~~~~~~~~~~~~~~~
264265

265-
The Request class has many other methods that you can use to access the
266-
request information. Have a look at the API for more information about them.
266+
The ``Request`` class has many other methods that you can use to access the
267+
request information. Have a look at
268+
:class:`the Request API<Symfony\\Component\\HttpFoundation\\Request>`
269+
for more information about them.
267270

268271
Response
269272
--------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp