Skip to content

Commit 933de7f

Browse files
cordovalweaverryan
authored andcommitted
clarifies that resolve() does return a plain array of options
1 parent 4aac066 commit 933de7f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

components/options_resolver.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ The advantages of doing this will become more obvious as you continue::
5050
$this->options = $resolver->resolve($options);
5151
}
5252

53-
The ``$options`` property is an instance of
54-
:class:`Symfony\\Component\\OptionsResolver\\Options`, which implements
55-
:phpclass:`ArrayAccess`, :phpclass:`Iterator` and :phpclass:`Countable`. That
56-
means you can handle it just like a normal array::
53+
The options property now is a well defined array with all resolved options readily available::
5754

5855
// ...
5956
public function getHost()
@@ -76,8 +73,6 @@ Now, try to actually use the class::
7673
'password' => 'pa$$word',
7774
));
7875

79-
echo $mailer->getPassword();
80-
8176
Right now, you'll receive a
8277
:class:`Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException`,
8378
which tells you that the options ``host`` and ``password`` do not exist.

0 commit comments

Comments
 (0)