Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions components/options_resolver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -944,3 +944,24 @@ method ``clearOptionsConfig()`` and call it periodically::

That's it! You now have all the tools and knowledge needed to process
options in your code.

Get More Insights
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The `OptionsResolverIntrospector` inspect options definitions inside an `OptionsResolver` instance.

method::

use Symfony\Component\OptionsResolver\Debug\OptionsResolverIntrospector;
use Symfony\Component\OptionsResolver\OptionsResolver;

$resolver = new OptionsResolver();
$resolver->setDefaults([
'host' => 'smtp.example.org',
'port' => 25,
]);

$introspector = new OptionsResolverIntrospector($resolver);
$introspector->getDefault('host'); // Retrieves "smtp.example.org"