Security update for Core, with self-updated composer
[yaffs-website] / web / core / lib / Drupal / Core / DependencyInjection / ClassResolverInterface.php
1 <?php
2
3 namespace Drupal\Core\DependencyInjection;
4
5 /**
6  * Provides an interface to get a instance of a class with dependency injection.
7  */
8 interface ClassResolverInterface {
9
10   /**
11    * Returns a class instance with a given class definition.
12    *
13    * In contrast to controllers you don't specify a method.
14    *
15    * @param string $definition
16    *   A class name or service name.
17    *
18    * @return object
19    *   The instance of the class.
20    *
21    * @throws \InvalidArgumentException
22    *   If $class is not a valid service identifier and the class does not exist.
23    */
24   public function getInstanceFromDefinition($definition);
25
26 }