getServiceLocator() public method

Get the service Locator
public getServiceLocator ( ) : Locator
return Pop\Service\Locator
Example #1
0
 public function testServiceLocator()
 {
     $p = new Project();
     $p->setService('config', 'Pop\\Config', array(array('test' => 123)))->setService('color', 'Pop\\Color\\Color', function () {
         return array(new \Pop\Color\Space\Rgb(255, 0, 0));
     });
     $this->assertInstanceOf('Pop\\Config', $p->getService('config'));
     $this->assertInstanceOf('Pop\\Color\\Color', $p->getService('color'));
     $this->assertInstanceOf('Pop\\Service\\Locator', $p->getServiceLocator());
 }