Gets the configurator to call after the service is fully initialized.
public getConfigurator ( ) : callable | null | ||
return | callable | null | The PHP callable to call |
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; $containerBuilder = new ContainerBuilder(); $definition = new Definition('MyClass'); $configurator = $definition->getConfigurator();
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; $containerBuilder = new ContainerBuilder(); $definition = new Definition('MyClass', [], [$callable, 'methodName']); $configurator = $definition->getConfigurator();In this example, we create a new ContainerBuilder, Definition with a callable method, and retrieve the Configurator by calling getConfigurator on the Definition. Overall, the Definition getConfigurator method is useful for retrieving the Configurator associated with a Definition in order to configure or manipulate a service instance. It is part of the Symfony\Component\DependencyInjection package library.
public getConfigurator ( ) : callable | null | ||
return | callable | null | The PHP callable to call |