Gets a service.
@api
string $id The service identifier:
int $invalidBehavior The behavior when the service does not exist:
object The associated service
InvalidArgumentException if the service is not defined
ServiceCircularReferenceException When a circular reference is detected
ServiceNotFoundException When the service is not defined
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE);