returns all drivers
@return array key is alias, value is the service
544314
public function getDrivers()
    {
        $drivers = array();
        foreach($this->aliases as $alias => $service) {
            $drivers[$alias] = $this->container->get($service);
        }
        return $drivers;
    }
1196648
public function getDriver()
    {
        if ($this->driver) {
            return $this->driver;
        }

        // Get driver configuration
        $config = $this->getConfig('drivers.' . $this->getConfig('driver'), []);

        // Get driver class
        $driver = Arr::pull($config, 'class');

        // Create driver instance
        return $this->driver = new $driver($config, $this->locale);
    }
1374332
public function getResources()
    {
        $services = [];
        foreach (ServiceManager::getServiceNames(true) as $serviceName) {
            if (Session::allowsServiceAccess($serviceName)) {
                $services[] = [static::getResourceIdentifier() => $serviceName];
            }
        }

        return $services;
    }
350264
final public function getServices()
    {
        if (is_null($this->serviceProviders)) {
            $this->serviceProviders = $this->getServiceProviders();
        }

        return $this->serviceProviders;
    }
988448
public static function getDrivers()
        {
            $types = array();

            if (class_exists('\PDO')) {
                $types[self::DRIVER_MYSQL] = 'MySQL / MariaDB';
                $types[self::DRIVER_POSTGRES] = 'PostgreSQL';
                $types[self::DRIVER_MS_SQL_SERVER] = 'Microsoft SQL Server';
            } else {
                throw new Exception('You need to have PHP PDO installed to be able to use B2DB');
            }

            return $types;
        }
1156104
public function getServiceIds()
    {
        return array_unique(array_merge(['service_container'], array_keys($this->fileMap), array_keys($this->methodMap), array_keys($this->services)));
    }
475532
public function getServices()
    {
        # Get all services
        $services = [];
        foreach ($this->wmi->ExecQuery('SELECT Name, DisplayName, ServiceType, StartMode, StartName, State, Status '.
                                       'FROM Win32_Service') as $service)
        {
            $services[] = [
                'name' => $service->Name,
                'displayname' => $service->DisplayName,
                'servicetype' => $service->ServiceType,
                'startmode' => $service->StartMode,
                'startname' => $service->StartName,
                'state' => $service->State,
                'status' => $service->Status
            ];
        }

        return $services;
    }
368373
public function get_aliases() {
		$runtime_alias = getenv( 'WP_CLI_RUNTIME_ALIAS' );
		if ( false !== $runtime_alias ) {
			$returned_aliases = array();
			foreach ( json_decode( $runtime_alias, true ) as $key => $value ) {
				if ( preg_match( '#' . self::ALIAS_REGEX . '#', $key ) ) {
					$returned_aliases[ $key ] = array();
					foreach ( self::$alias_spec as $i ) {
						if ( isset( $value[ $i ] ) ) {
							$returned_aliases[ $key ][ $i ] = $value[ $i ];
						}
					}
				}
			}
			return $returned_aliases;
		}

		return $this->aliases;
	}
1237641
public function getDriverManager(): Interfaces\JavaObject
    {
        if ($this->driverManager === null) {
            $this->driverManager = $this->ba->javaClass('java.sql.DriverManager');
        }

        return $this->driverManager;
    }
1349999
public function getDrivers(): array
    {
        $result = [];
        foreach (array_keys($this->config['connections'] ?? $this->config['drivers'] ?? []) as $driver) {
            $result[$driver] = $this->getDriver($driver);
        }

        return $result;
    }
444979
static private function getDriver() {
        if (self::$_driver != null) return self::$_driver;
        
        $driver = Utils::spare(Config::get('session.driver'), 'default');

        switch (strtolower($driver)) {
            case 'cookie':
                self::$_driver = new \Lollipop\Session\Cookie();
                break;
                
            case 'default':
            default:
                self::$_driver = new \Lollipop\Session\Session();
                break;
        }
        
        return self::$_driver;
    }
1110191
public static function getDriverEvents()
    {
        return [
            DriverEvents::DRIVER_GET_CONFIGURATION => [
                ["getConfiguration", 0],
            ],
            DriverEvents::DRIVER_LOAD_CONFIGURATION => [
                ["loadConfiguration", 0],
            ],
            DriverEvents::INDEX_CREATE => [
                ["createIndex", 0],
            ],
            DriverEvents::INDEX_EXISTS => [
                ["indexExists", 0],
            ],
            DriverEvents::INDEX_DELETE => [
                ["deleteIndex", 0],
            ],
            DriverEvents::INDEXES_PERSIST => [
                ["persistIndexes", 0],
            ],
            DriverEvents::INDEX_SEARCH_QUERY => [
                ["executeSearchQuery", 0],
            ]
        ];
    }
413308
private function createDrivers($driverKeys)
    {
        $this->drivers = [];

        foreach ($driverKeys as $driverKey) {
            $driverClass = $this->classNameResolver->getClassNameByDriverKey($driverKey);
            $this->drivers[$driverKey] = new $driverClass();
        }

        return $this->drivers;
    }
465479
public function aliases()
    {
        return collect($this->getManifest())->flatMap(function ($configuration) {
            return (array) ($configuration['aliases'] ? $configuration['aliases'] : []);
        })->filter()->all();
    }
387398
protected function getDriversFromStorage()
    {
        if ($this->cache->has(self::$cacheKey)) {
            return $this->cache->get(self::$cacheKey, []);
        }
        $options = Component::findOneByName('api')->options;

        $drivers = array_get($options, 'auth_drivers');

        $this->cache->put(self::$cacheKey, $drivers);

        return $drivers;
    }
1021666
public function getServiceConfig()
    {
        return array(
            'invokables' => array(
                'dlcdoctrine_event_finishlistener' => 'DlcDoctrine\Event\FinishListener',
                'dlcdoctrine_setup_service' => 'DlcDoctrine\Service\Setup',
            ),
            'factories' => array(
                'dlcdoctrine_module_options' => function ($sm) {
                    $config = $sm->get('Config');
                    return new Options\ModuleOptions(isset($config['dlcdoctrine']) ? $config['dlcdoctrine'] : array());
                },
                'dlcdoctrine_resolvetargetentitylistener' => function ($sm) {
                    $options = $sm->get('dlcdoctrine_module_options');
                    //Create instance of ResolveTargetEntityListener
                    $resolveTargetEntityListener = new \DlcDoctrine\Event\ResolveTargetEntityListener();
                    //Add all resolve target entities
                    foreach ($options->getResolveTargetEntities() as $originalEntity => $newConfig) {
                        $resolveTargetEntityListener->addResolveTargetEntity($originalEntity, $newConfig['newEntity'], $newConfig['mapping']);
                    }
                    
                    return $resolveTargetEntityListener;
                }
            ),
            'initializers' => array(
                function ($instance, $sm) {
                    if ($instance instanceof \DoctrineModule\Persistence\ObjectManagerAwareInterface) {
                        $instance->setObjectManager($sm->get('doctrine.entitymanager.orm_default'));
                    }
                }
            ),
        );
    }
42279
public function getServices()
    {
        $this->container = parent::getServices();
        $this->container['db'] = function ($c) {
            $db = new Db();
            $db->setCredentials($this->getDbConfig());
            $type = 'mysqli';
            if(class_exists('Pdo')) {
                $type = 'pdo';
            }
            
            $db->setAccessType($type);
            return $db;
        };
        
        $this->container['encrypt'] = function ($c) {
            $encrypt = new Encrypt();
            $new_key = $c['platform']->getEncryptionKey();
            $encrypt->setKey($new_key);
            return $encrypt;
        };
        
        $this->container['lang'] = function ($c) {
            $lang = new Language();
            if (is_array($this->getLangPath())) {
                foreach ($this->getLangPath() as $path) {
                    $lang->init($path);
                }
            } elseif ($this->getLangPath() != '') {
                $lang->init($this->getLangPath());
            }
            return $lang;
        };
        
        $this->container['validate'] = function ($c) {
            $validate = new Validate();
            $validate->setRegex($this->container['regex']);
            return $validate;
        };
        
        $this->container['files'] = function ($c) {
            $file = new Files();
            return $file;
        };
        
        $this->container['errors'] = function ($c) {
            $errors = new Errors();
            $errors->setValidation($c['validate']);
            return $errors;
        };
        
        $this->container['license'] = function ($c) {
            $license = new License();
            return $license;
        };
        
        $this->container['email'] = function ($c) {
            
            $email = new Email();
            $email->setView($c['view']);
            $email->setLang($c['lang']);
            return $email;
        };
        
        $this->container['view'] = function ($c) {
            $view = new View();
            $helpers = array(
                'file_size' => function ($text) {
                    return $this->container['view_helpers']->m62FileSize($text, false);
                },
                'lang' => function ($text) {
                    return $this->container['view_helpers']->m62Lang($text);
                },
                'date_time' => function ($text, $html = true) {
                    return $this->container['view_helpers']->m62DateTime($text, false);
                },
                'relative_time' => function ($date) {
                    return $this->container['view_helpers']->m62RelativeDateTime($date);
                },
                'encode' => function ($text) {
                    return $this->container['view_helpers']->m62Encode($text);
                },
                'decode' => function ($text) {
                    return $this->container['view_helpers']->m62Decode($text);
                }
            );
            
            $view->addHelper('m62', $helpers);
            return $view;
        };
        
        $this->container['regex'] = function ($c) {
            $regex = new Regex();
            return $regex;
        };
        
        $this->container['shell'] = function ($c) {
            $shell = new Shell();
            return $shell;
        };
        
        $this->container['console'] = function ($c) {
            $console = new Console();
            $console->setLang($c['lang']);
            return $console;
        };
        
        return $this->container;
    }