Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/DependencyInjection/ContainerInjectionInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\Core\DependencyInjection; | |
4 | |
5 use Symfony\Component\DependencyInjection\ContainerInterface; | |
6 | |
7 /** | |
8 * Defines a common interface for dependency container injection. | |
9 * | |
10 * This interface gives classes who need services a factory method for | |
11 * instantiation rather than defining a new service. | |
12 */ | |
13 interface ContainerInjectionInterface { | |
14 | |
15 /** | |
16 * Instantiates a new instance of this class. | |
17 * | |
18 * This is a factory method that returns a new instance of this class. The | |
19 * factory should pass any needed dependencies into the constructor of this | |
20 * class, but not the container itself. Every call to this method must return | |
21 * a new instance of this class; that is, it may not implement a singleton. | |
22 * | |
23 * @param \Symfony\Component\DependencyInjection\ContainerInterface $container | |
24 * The service container this instance should use. | |
25 */ | |
26 public static function create(ContainerInterface $container); | |
27 | |
28 } |