Mercurial > hg > isophonics-drupal-site
annotate core/lib/Drupal/Core/DependencyInjection/ContainerInjectionInterface.php @ 13:5fb285c0d0e3
Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've
been lucky to get away with this so far, as we don't support self-registration
which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5
was vulnerable to.
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:33:26 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\Core\DependencyInjection; |
Chris@0 | 4 |
Chris@0 | 5 use Symfony\Component\DependencyInjection\ContainerInterface; |
Chris@0 | 6 |
Chris@0 | 7 /** |
Chris@0 | 8 * Defines a common interface for dependency container injection. |
Chris@0 | 9 * |
Chris@0 | 10 * This interface gives classes who need services a factory method for |
Chris@0 | 11 * instantiation rather than defining a new service. |
Chris@0 | 12 */ |
Chris@0 | 13 interface ContainerInjectionInterface { |
Chris@0 | 14 |
Chris@0 | 15 /** |
Chris@0 | 16 * Instantiates a new instance of this class. |
Chris@0 | 17 * |
Chris@0 | 18 * This is a factory method that returns a new instance of this class. The |
Chris@0 | 19 * factory should pass any needed dependencies into the constructor of this |
Chris@0 | 20 * class, but not the container itself. Every call to this method must return |
Chris@0 | 21 * a new instance of this class; that is, it may not implement a singleton. |
Chris@0 | 22 * |
Chris@0 | 23 * @param \Symfony\Component\DependencyInjection\ContainerInterface $container |
Chris@0 | 24 * The service container this instance should use. |
Chris@0 | 25 */ |
Chris@0 | 26 public static function create(ContainerInterface $container); |
Chris@0 | 27 |
Chris@0 | 28 } |