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

Commit4be1ae1

Browse files
committed
Merge branch '2.0' into 2.1
2 parents2ea1333 +59adb5f commit4be1ae1

File tree

3 files changed

+39
-39
lines changed

3 files changed

+39
-39
lines changed

‎components/routing/introduction.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,11 @@ If you're using the ``YamlFileLoader``, then route definitions look like this:
233233
# routes.yml
234234
route1:
235235
pattern:/foo
236-
defaults:{controller: 'MyController::fooAction' }
236+
defaults:{_controller: 'MyController::fooAction' }
237237
238238
route2:
239239
pattern:/foo/bar
240-
defaults:{controller: 'MyController::foobarAction' }
240+
defaults:{_controller: 'MyController::foobarAction' }
241241
242242
To load this file, you can use the following code. This assumes that your
243243
``routes.yml`` file is in the same directory as the below code::

‎reference/constraints/Type.rst

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,30 @@ Basic Usage
3333
3434
..code-block::php-annotations
3535
36-
// src/Acme/BlogBundle/Entity/Author.php
37-
namespace Acme\BlogBundle\Entity;
38-
39-
use Symfony\Component\Validator\Constraints as Assert;
40-
41-
class Author
42-
{
43-
/**
44-
* @Assert\Type(type="integer", message="The value {{ value }} is not a valid {{ type }}.")
45-
*/
36+
// src/Acme/BlogBundle/Entity/Author.php
37+
namespace Acme\BlogBundle\Entity;
38+
39+
use Symfony\Component\Validator\Constraints as Assert;
40+
41+
class Author
42+
{
43+
/**
44+
* @Assert\Type(type="integer", message="The value {{ value }} is not a valid {{ type }}.")
45+
*/
4646
protected $age;
47-
}
47+
}
4848
4949
..code-block::xml
5050
51-
<!-- src/Acme/BlogBundle/Resources/config/validation.xml-->
52-
<classname="Acme\BlogBundle\Entity\Author">
53-
<propertyname="age">
54-
<constraintname="Type">
55-
<optionname="type">integer</option>
56-
<optionname="message">The value {{ value }} is not a valid {{ type }}.</option>
57-
</constraint>
58-
</property>
59-
</class>
51+
<!-- src/Acme/BlogBundle/Resources/config/validation.xml-->
52+
<classname="Acme\BlogBundle\Entity\Author">
53+
<propertyname="age">
54+
<constraintname="Type">
55+
<optionname="type">integer</option>
56+
<optionname="message">The value {{ value }} is not a valid {{ type }}.</option>
57+
</constraint>
58+
</property>
59+
</class>
6060
6161
Options
6262
-------
@@ -71,22 +71,22 @@ type
7171
This required option is the fully qualified class name or one of the PHP datatypes
7272
as determined by PHP's ``is_`` functions.
7373

74-
* `array<http://php.net/is_array>`_
75-
* `bool<http://php.net/is_bool>`_
76-
* `callable<http://php.net/is_callable>`_
77-
* `float<http://php.net/is_float>`_
78-
* `double<http://php.net/is_double>`_
79-
* `int<http://php.net/is_int>`_
80-
* `integer<http://php.net/is_integer>`_
81-
* `long<http://php.net/is_long>`_
82-
* `null<http://php.net/is_null>`_
83-
* `numeric<http://php.net/is_numeric>`_
84-
* `object<http://php.net/is_object>`_
85-
* `real<http://php.net/is_real>`_
86-
* `resource<http://php.net/is_resource>`_
87-
* `scalar<http://php.net/is_scalar>`_
88-
* `string<http://php.net/is_string>`_
89-
74+
* `array<http://php.net/is_array>`_
75+
* `bool<http://php.net/is_bool>`_
76+
* `callable<http://php.net/is_callable>`_
77+
* `float<http://php.net/is_float>`_
78+
* `double<http://php.net/is_double>`_
79+
* `int<http://php.net/is_int>`_
80+
* `integer<http://php.net/is_integer>`_
81+
* `long<http://php.net/is_long>`_
82+
* `null<http://php.net/is_null>`_
83+
* `numeric<http://php.net/is_numeric>`_
84+
* `object<http://php.net/is_object>`_
85+
* `real<http://php.net/is_real>`_
86+
* `resource<http://php.net/is_resource>`_
87+
* `scalar<http://php.net/is_scalar>`_
88+
* `string<http://php.net/is_string>`_
89+
9090
message
9191
~~~~~~~
9292

‎reference/constraints/UniqueEntity.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Options
8181
fields
8282
~~~~~~
8383

84-
**type**: ``array``|``string`` [:ref:`default option<validation-default-option>`]
84+
**type**: ``array`` |``string`` [:ref:`default option<validation-default-option>`]
8585

8686
This required option is the field (or list of fields) on which this entity
8787
should be unique. For example, if you specified both the ``email`` and ``name``

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp