interface ClassResolverInterface
Same name in other branches
- 9 core/lib/Drupal/Core/DependencyInjection/ClassResolverInterface.php \Drupal\Core\DependencyInjection\ClassResolverInterface
- 10 core/lib/Drupal/Core/DependencyInjection/ClassResolverInterface.php \Drupal\Core\DependencyInjection\ClassResolverInterface
- 11.x core/lib/Drupal/Core/DependencyInjection/ClassResolverInterface.php \Drupal\Core\DependencyInjection\ClassResolverInterface
Provides an interface to get a instance of a class with dependency injection.
Hierarchy
- interface \Drupal\Core\DependencyInjection\ClassResolverInterface
Expanded class hierarchy of ClassResolverInterface
All classes that implement ClassResolverInterface
21 files declare their use of ClassResolverInterface
- ConstraintValidatorFactory.php in core/
lib/ Drupal/ Core/ Validation/ ConstraintValidatorFactory.php - ContextDefinitionIsSatisfiedTest.php in core/
tests/ Drupal/ Tests/ Core/ Plugin/ Context/ ContextDefinitionIsSatisfiedTest.php - ContextHandlerTest.php in core/
tests/ Drupal/ Tests/ Core/ Plugin/ ContextHandlerTest.php - Contains \Drupal\Tests\Core\Plugin\ContextHandlerTest.
- ControllerResolver.php in core/
lib/ Drupal/ Core/ Controller/ ControllerResolver.php - CustomAccessCheckTest.php in core/
tests/ Drupal/ Tests/ Core/ Access/ CustomAccessCheckTest.php - Contains \Drupal\Tests\Core\Access\CustomAccessCheckTest.
File
-
core/
lib/ Drupal/ Core/ DependencyInjection/ ClassResolverInterface.php, line 8
Namespace
Drupal\Core\DependencyInjectionView source
interface ClassResolverInterface {
/**
* Returns a class instance with a given class definition.
*
* In contrast to controllers you don't specify a method.
*
* @param string $definition
* A class name or service name.
*
* @return object
* The instance of the class.
*
* @throws \InvalidArgumentException
* If $class is not a valid service identifier and the class does not exist.
*/
public function getInstanceFromDefinition($definition);
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
ClassResolverInterface::getInstanceFromDefinition | public | function | Returns a class instance with a given class definition. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.