Ejemplo n.º 1
0
 public function __construct(ConnectionManagerInterface $connectionManager)
 {
     if (empty(static::$_serviceLocator)) {
         $serviceLocator = new \Lumel\ServiceLocator();
         $serviceLocator->add('ConnectionManager', $connectionManager);
         $serviceLocator->add('Mapper', new Mapper());
         $serviceLocator->add('DataType', new DataType());
         static::$_serviceLocator = $serviceLocator;
     }
 }
Ejemplo n.º 2
0
 public static function setInstance(ServiceLocatorInterface $serviceLocator)
 {
     static::$_serviceLocator = $serviceLocator;
 }