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

Commitc8bfde6

Browse files
committed
Merge branch '2.4'
Conflicts:changelog.rstcomponents/stopwatch.rst
2 parents98288fc +863a764 commitc8bfde6

File tree

6 files changed

+46
-42
lines changed

6 files changed

+46
-42
lines changed

‎book/controller.rst

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -279,44 +279,44 @@ the following guidelines in mind while you develop.
279279

280280
* **The order of the controller arguments does not matter**
281281

282-
Symfony is able to match the parameter names from the route to the variable
283-
names in the controller method's signature. In other words, it realizes that
284-
the ``{lastName}`` parameter matches up with the ``$lastName`` argument.
285-
The arguments of the controller could be totally reordered and still work
286-
perfectly::
287-
288-
public function indexAction($lastName, $color, $firstName)
289-
{
290-
// ...
291-
}
282+
Symfony is able to match the parameter names from the route to the variable
283+
names in the controller method's signature. In other words, it realizes that
284+
the ``{lastName}`` parameter matches up with the ``$lastName`` argument.
285+
The arguments of the controller could be totally reordered and still work
286+
perfectly::
287+
288+
public function indexAction($lastName, $color, $firstName)
289+
{
290+
// ...
291+
}
292292

293293
* **Each required controller argument must match up with a routing parameter**
294294

295-
The following would throw a ``RuntimeException`` because there is no ``foo``
296-
parameter defined in the route::
295+
The following would throw a ``RuntimeException`` because there is no ``foo``
296+
parameter defined in the route::
297297

298-
public function indexAction($firstName, $lastName, $color, $foo)
299-
{
300-
// ...
301-
}
298+
public function indexAction($firstName, $lastName, $color, $foo)
299+
{
300+
// ...
301+
}
302302

303-
Making the argument optional, however, is perfectly ok. The following
304-
example would not throw an exception::
303+
Making the argument optional, however, is perfectly ok. The following
304+
example would not throw an exception::
305305

306-
public function indexAction($firstName, $lastName, $color, $foo = 'bar')
307-
{
308-
// ...
309-
}
306+
public function indexAction($firstName, $lastName, $color, $foo = 'bar')
307+
{
308+
// ...
309+
}
310310

311311
* **Not all routing parameters need to be arguments on your controller**
312312

313-
If, for example, the ``lastName`` weren't important for your controller,
314-
you could omit it entirely::
313+
If, for example, the ``lastName`` weren't important for your controller,
314+
you could omit it entirely::
315315

316-
public function indexAction($firstName, $color)
317-
{
318-
// ...
319-
}
316+
public function indexAction($firstName, $color)
317+
{
318+
// ...
319+
}
320320

321321
..tip::
322322

‎components/dependency_injection/definitions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ In a similar way you can replace an already set argument by index using::
8888
You can also replace all the arguments (or set some if there are none) with
8989
an array of arguments::
9090

91-
$definition->replaceArguments($arguments);
91+
$definition->setArguments($arguments);
9292

9393
Method Calls
9494
~~~~~~~~~~~~

‎components/stopwatch.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ microtime by yourself. Instead, use the simple
3434
..versionadded::2.5
3535
The ``getEvent()`` method was introduced in Symfony 2.5
3636

37-
The:class:`Symfony\\Component\\Stopwatch\StopwatchEvent` object can be retrieved
37+
The:class:`Symfony\\Component\\Stopwatch\\StopwatchEvent` object can be retrieved
3838
from the:method:`Symfony\\Component\\Stopwatch\\Stopwatch::start`,
3939
:method:`Symfony\\Component\\Stopwatch\\Stopwatch::stop`,
4040
:method:`Symfony\\Component\\Stopwatch\\Stopwatch::lap` and

‎contributing/code/conventions.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ Method Names
1313
When an object has a "main" many relation with related "things"
1414
(objects, parameters, ...), the method names are normalized:
1515

16-
* ``get()``
17-
* ``set()``
18-
* ``has()``
19-
* ``all()``
20-
* ``replace()``
21-
* ``remove()``
22-
* ``clear()``
23-
* ``isEmpty()``
24-
* ``add()``
25-
* ``register()``
26-
* ``count()``
27-
* ``keys()``
16+
* ``get()``
17+
* ``set()``
18+
* ``has()``
19+
* ``all()``
20+
* ``replace()``
21+
* ``remove()``
22+
* ``clear()``
23+
* ``isEmpty()``
24+
* ``add()``
25+
* ``register()``
26+
* ``count()``
27+
* ``keys()``
2828

2929
The usage of these methods are only allowed when it is clear that there
3030
is a main relation:

‎cookbook/console/commands_as_services.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ have some ``NameRepository`` service that you'll use to get your default value::
9090

9191
public function __construct(NameRepository $nameRepository)
9292
{
93+
parent::__construct();
94+
9395
$this->nameRepository = $nameRepository;
9496
}
9597

‎install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ function sparse_checkout {
88
git remote add -f origin http://github.com/$1/$2
99
echo Resources/doc> .git/info/sparse-checkout
1010
git checkout master
11+
rm -rf ../bundles/$2
1112
mv Resources/doc ../bundles/$2
1213
cd ..
1314
rm -rf sparse_checkout
@@ -18,5 +19,6 @@ sparse_checkout sensiolabs SensioGeneratorBundle
1819
sparse_checkout doctrine DoctrineFixturesBundle
1920
sparse_checkout doctrine DoctrineMigrationsBundle
2021
sparse_checkout doctrine DoctrineMongoDBBundle
22+
rm -rf cmf
2123
git clone http://github.com/symfony-cmf/symfony-cmf-docs cmf
2224

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp