OptimizedPhpArrayDumper::getServiceCall

protected OptimizedPhpArrayDumper::getServiceCall($id, $invalid_behavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)

Gets a service reference for an ID in a suitable PHP array format.

Parameters

string $id: The ID of the service to get a reference for.

int $invalid_behavior: (optional) The invalid behavior of the service.

Return value

string|\stdClass A suitable representation of the service reference.

File

core/lib/Drupal/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumper.php, line 483

Class

OptimizedPhpArrayDumper
OptimizedPhpArrayDumper dumps a service container as a serialized PHP array.

Namespace

Drupal\Component\DependencyInjection\Dumper

Code

protected function getServiceCall($id, $invalid_behavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE) {
  return (object) array(
    'type' => 'service',
    'id' => $id,
    'invalidBehavior' => $invalid_behavior,
  );
}
doc_Drupal
2016-10-29 09:32:37
Comments
Leave a Comment

Please login to continue.