public ContainerBuilder::register($id, $class = null)
Registers a service definition.
This methods allows for simple registration of service definition with a fluid interface.
string $id The service identifier:
string $class The service class:
Definition A Definition instance
Overrides ContainerBuilder::register
public function register($id, $class = null) { if (strtolower($id) !== $id) { throw new \InvalidArgumentException("Service ID names must be lowercase: $id"); } return parent::register($id, $class); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!DependencyInjection!ContainerBuilder.php/function/ContainerBuilder::register/8.1.x