Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/DependencyInjection/ClassResolverInterface.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 /** | |
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 } |