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

Appearance settings

Commit 8e46ff7

Browse filesBrowse files
committed
Merge branch '3.4' into 4.4
* 3.4: Update definitions.rst
2 parents 5016434 + e68834e commit 8e46ff7
Copy full SHA for 8e46ff7

File tree

1 file changed

+5
-1
lines changed
Filter options

1 file changed

+5
-1
lines changed

‎service_container/definitions.rst

Copy file name to clipboardExpand all lines: service_container/definitions.rst
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,18 @@ fetched from the container::
8989

9090
// gets a specific argument
9191
$firstArgument = $definition->getArgument(0);
92+
93+
// adds a new argument with the name of the argument
94+
// $argumentName = the name of the argument in the constructor
95+
$argument = $definition->setArgument('$argumentName', $argumentValue);
9296

9397
// adds a new argument
9498
$definition->addArgument($argument);
9599

96100
// replaces argument on a specific index (0 = first argument)
97101
$definition->replaceArgument($index, $argument);
98102

99-
// replace all previously configured arguments with the passed array
103+
// replaces all previously configured arguments with the passed array
100104
$definition->setArguments($arguments);
101105

102106
.. caution::

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.