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; } }
public static function setInstance(ServiceLocatorInterface $serviceLocator) { static::$_serviceLocator = $serviceLocator; }