methodMap = array( 'foo' => 'getFooService', ); } /** * Gets the 'foo' service. * * This service is shared. * This method always returns the same instance of the service. * * This service is autowired. * * @return \Foo A Foo instance */ protected function getFooService() { return $this->services['foo'] = new \Foo(); } }