DayleRees\ContainerDebug\Command::resolveService PHP Метод

resolveService() публичный Метод

Resolve a service from the container by its identifier.
public resolveService ( string $identifier ) : mixed
$identifier string
Результат mixed
    public function resolveService($identifier)
    {
        return $this->laravel->make($identifier);
    }

Usage Example

Пример #1
0
 public function testThatAServiceCanBeResolved()
 {
     $container = m::mock('Illuminate\\Container\\Container');
     $container->shouldReceive('make')->once()->andReturn('bar');
     $command = new Command();
     $command->setLaravel($container);
     $result = $command->resolveService('foo');
     $this->assertEquals('bar', $result);
 }