protected function detectDrivers() { try { if (class_exists('Cache')) { $class = get_class(\Auth::driver()); $this->extra['Auth'] = array($class); $this->interfaces['\\Illuminate\\Auth\\UserProviderInterface'] = $class; } } catch (\Exception $e) { } try { if (class_exists('DB')) { $class = get_class(\DB::connection()); $this->extra['DB'] = array($class); $this->interfaces['\\Illuminate\\Database\\ConnectionInterface'] = $class; } } catch (\Exception $e) { } try { if (class_exists('Cache')) { $driver = get_class(\Cache::driver()); $store = get_class(\Cache::getStore()); $this->extra['Cache'] = array($driver, $store); $this->interfaces['\\Illuminate\\Cache\\StoreInterface'] = $store; } } catch (\Exception $e) { } try { if (class_exists('Queue')) { $class = get_class(\Queue::connection()); $this->extra['Queue'] = array($class); $this->interfaces['\\Illuminate\\Queue\\QueueInterface'] = $class; } } catch (\Exception $e) { } try { if (class_exists('SSH')) { $class = get_class(\SSH::connection()); $this->extra['SSH'] = array($class); $this->interfaces['\\Illuminate\\Remote\\ConnectionInterface'] = $class; } } catch (\Exception $e) { } // Make all interface classes absolute foreach ($this->interfaces as &$interface) { $interface = '\\' . ltrim($interface, '\\'); } }
protected function detectDrivers() { try { if (class_exists('Auth') && is_a('Auth', '\\Illuminate\\Support\\Facades\\Auth', true)) { $class = get_class(\Auth::driver()); $this->extra['Auth'] = array($class); $this->interfaces['\\Illuminate\\Auth\\UserProviderInterface'] = $class; } } catch (\Exception $e) { } try { if (class_exists('DB') && is_a('DB', '\\Illuminate\\Support\\Facades\\DB', true)) { $class = get_class(\DB::connection()); $this->extra['DB'] = array($class); $this->interfaces['\\Illuminate\\Database\\ConnectionInterface'] = $class; } } catch (\Exception $e) { } try { if (class_exists('Cache') && is_a('Cache', '\\Illuminate\\Support\\Facades\\Cache', true)) { $driver = get_class(\Cache::driver()); $store = get_class(\Cache::getStore()); $this->extra['Cache'] = array($driver, $store); $this->interfaces['\\Illuminate\\Cache\\StoreInterface'] = $store; } } catch (\Exception $e) { } try { if (class_exists('Queue') && is_a('Queue', '\\Illuminate\\Support\\Facades\\Queue', true)) { $class = get_class(\Queue::connection()); $this->extra['Queue'] = array($class); $this->interfaces['\\Illuminate\\Queue\\QueueInterface'] = $class; } } catch (\Exception $e) { } try { if (class_exists('SSH') && is_a('SSH', '\\Illuminate\\Support\\Facades\\SSH', true)) { $class = get_class(\SSH::connection()); $this->extra['SSH'] = array($class); $this->interfaces['\\Illuminate\\Remote\\ConnectionInterface'] = $class; } } catch (\Exception $e) { } }
protected function detectDrivers() { $this->interfaces['\\Illuminate\\Contracts\\Auth\\Authenticatable'] = config('auth.model', 'App\\User'); try { if (class_exists('Auth') && is_a('Auth', '\\Illuminate\\Support\\Facades\\Auth', true)) { $authMethod = version_compare(Application::VERSION, '5.2', '>=') ? 'guard' : 'driver'; $class = get_class(\Auth::$authMethod()); $this->extra['Auth'] = array($class); $this->interfaces['\\Illuminate\\Auth\\UserProviderInterface'] = $class; } } catch (\Exception $e) { } try { if (class_exists('DB') && is_a('DB', '\\Illuminate\\Support\\Facades\\DB', true)) { $class = get_class(\DB::connection()); $this->extra['DB'] = array($class); $this->interfaces['\\Illuminate\\Database\\ConnectionInterface'] = $class; } } catch (\Exception $e) { } try { if (class_exists('Cache') && is_a('Cache', '\\Illuminate\\Support\\Facades\\Cache', true)) { $driver = get_class(\Cache::driver()); $store = get_class(\Cache::getStore()); $this->extra['Cache'] = array($driver, $store); $this->interfaces['\\Illuminate\\Cache\\StoreInterface'] = $store; } } catch (\Exception $e) { } try { if (class_exists('Queue') && is_a('Queue', '\\Illuminate\\Support\\Facades\\Queue', true)) { $class = get_class(\Queue::connection()); $this->extra['Queue'] = array($class); $this->interfaces['\\Illuminate\\Queue\\QueueInterface'] = $class; } } catch (\Exception $e) { } try { if (class_exists('SSH') && is_a('SSH', '\\Illuminate\\Support\\Facades\\SSH', true)) { $class = get_class(\SSH::connection()); $this->extra['SSH'] = array($class); $this->interfaces['\\Illuminate\\Remote\\ConnectionInterface'] = $class; } } catch (\Exception $e) { } }
protected function detectDrivers() { $this->interfaces['\\Illuminate\\Contracts\\Auth\\Authenticatable'] = config('auth.providers.users.model', config('auth.model', 'App\\User')); try { if (class_exists('Auth') && is_a('Auth', '\\Illuminate\\Support\\Facades\\Auth', true)) { if (class_exists('\\Illuminate\\Foundation\\Application')) { $authMethod = version_compare(\Illuminate\Foundation\Application::VERSION, '5.2', '>=') ? 'guard' : 'driver'; } else { $refClass = new ReflectionClass('\\Laravel\\Lumen\\Application'); $versionStr = $refClass->newInstanceWithoutConstructor()->version(); $authMethod = strpos($versionStr, 'Lumen (5.0') === 0 ? 'driver' : (strpos($versionStr, 'Lumen (5.1') === 0 ? 'driver' : 'guard'); } $class = get_class(\Auth::$authMethod()); $this->extra['Auth'] = array($class); $this->interfaces['\\Illuminate\\Auth\\UserProviderInterface'] = $class; } } catch (\Exception $e) { } try { if (class_exists('DB') && is_a('DB', '\\Illuminate\\Support\\Facades\\DB', true)) { $class = get_class(\DB::connection()); $this->extra['DB'] = array($class); $this->interfaces['\\Illuminate\\Database\\ConnectionInterface'] = $class; } } catch (\Exception $e) { } try { if (class_exists('Cache') && is_a('Cache', '\\Illuminate\\Support\\Facades\\Cache', true)) { $driver = get_class(\Cache::driver()); $store = get_class(\Cache::getStore()); $this->extra['Cache'] = array($driver, $store); $this->interfaces['\\Illuminate\\Cache\\StoreInterface'] = $store; } } catch (\Exception $e) { } try { if (class_exists('Queue') && is_a('Queue', '\\Illuminate\\Support\\Facades\\Queue', true)) { $class = get_class(\Queue::connection()); $this->extra['Queue'] = array($class); $this->interfaces['\\Illuminate\\Queue\\QueueInterface'] = $class; } } catch (\Exception $e) { } try { if (class_exists('SSH') && is_a('SSH', '\\Illuminate\\Support\\Facades\\SSH', true)) { $class = get_class(\SSH::connection()); $this->extra['SSH'] = array($class); $this->interfaces['\\Illuminate\\Remote\\ConnectionInterface'] = $class; } } catch (\Exception $e) { } }