public static function Drush::service

master Drush.php public static Drush::service($id)

Retrieves a service from the container.

Use this method if the desired service is not one of those with a dedicated accessor method below. If it is listed below, those methods are preferred as they can return useful type hints.

Parameters

string $id: The ID of the service to retrieve.

Return value

mixed The specified service.

2 calls to Drush::service()

File

lib/Drush.php, line 160
Contains \Drush.

Class

Drush
Static Service Container wrapper.

Code

public static function service($id) {
  return static::getContainer()->get($id);
}