From 887f6f504f28e05a3b70770d35057a3e5aa6f4e4 Mon Sep 17 00:00:00 2001 From: PululuK Date: Mon, 17 Jul 2023 12:46:19 +0200 Subject: [PATCH] add `OptionsResolverIntrospector`usage doc --- components/options_resolver.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/components/options_resolver.rst b/components/options_resolver.rst index 3e7c657b79f..9c9ce53e524 100644 --- a/components/options_resolver.rst +++ b/components/options_resolver.rst @@ -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" + + pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy