public function Container::inject in Little helpers 7.2
Manually register an object as a service.
This is mainly supposed to be used for testing.
File
- src/
Services/ Container.php, line 191
Class
- Container
- Dependency injection container.
Namespace
Drupal\little_helpers\ServicesCode
public function inject($name, $instance) {
$this->instances[$name] = $instance;
}