public ClassResolverInterface::getInstanceFromDefinition($definition)
Returns a class instance with a given class definition.
In contrast to controllers you don't specify a method.
string $definition: A class name or service name.
object The instance of the class.
\InvalidArgumentException If $class is not a valid service identifier and the class does not exist.
public function getInstanceFromDefinition($definition);
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!DependencyInjection!ClassResolverInterface.php/function/ClassResolverInterface::getInstanceFromDefinition/8.1.x