July 2017
Intermediate to advanced
456 pages
11h 32m
English
This defines a callable service and function name that are invoked after the service is instantiated to set up an element of it. An example of this are some of the services exposed on the new HTTP client, Guzzle:
http_handler_stack: class: GuzzleHttp\HandlerStack public: false factory: GuzzleHttp\HandlerStack::create configurator: ['@http_handler_stack_configurator', configure]http_handler_stack_configurator: class: Drupal\Core\Http\HandlerStackConfigurator public: false arguments: ['@service_container']
When Drupal goes to instantiate the http_handler_stack service, it first creates the GuzzleHttp\HandlerStack object, then retrieves the http_handler_stack_configurator service, instantiating it as necessary. It then calls the ...
Read now
Unlock full access