Symfony\Component\DependencyInjection\ContainerBuilder::createService
Creates a service for a service definition.
Signature
public function createService(Definition
$definition,
[string
$id = true,
[Boolean
$tryProxy = true]] )
Parameters
$definition
—
Symfony\Component\DependencyInjection\Definition
- A service definition instance
$id
—
string
- The service identifier
$tryProxy
—
object
- Whether to try proxying the service with a lazy proxy
Returns
- The service described by the service definition
Errors/Exceptions
-
RuntimeException
- When the scope is inactive
-
RuntimeException
- When the factory definition is incomplete
-
RuntimeException
- When the service is a synthetic service
-
InvalidArgumentException
- When configure callable is not callable