public static function getDriverList(bool $FQCNAsKey = false): array
    {
        static $driverList;

        if (self::getDefaultNamespacePath() === self::getNamespacePath()) {
            if ($driverList === null) {
                $prefix = self::CORE_DRIVER_NAMESPACE;
                $classMap = self::createClassMap(__DIR__ . '/Drivers');
                $driverList = [];

                foreach ($classMap as $class => $file) {
                    $driverList[] = \str_replace($prefix, '', \substr($class, 0, \strrpos($class, '\\')));
                }

                $driverList = \array_values(\array_unique($driverList));
            }

            $driverList = \array_merge($driverList, \array_keys(self::$driverCustoms));

            if ($FQCNAsKey) {
                $realDriverList = [];
                foreach ($driverList as $driverName) {
                    $realDriverList[self::getDriverClass($driverName)] = $driverName;
                }
                $driverList = $realDriverList;
            }

            \asort($driverList);

            return $driverList;
        }

        throw new PhpfastcacheUnsupportedOperationException('Cannot get the driver list if the default namespace path has changed.');
    }
public static function getDriverList(bool $FQCNAsKey = false): array
    {
        static $driverList;

        if (self::getDefaultNamespacePath() === self::getNamespacePath()) {
            if ($driverList === null) {
                $prefix = self::CORE_DRIVER_NAMESPACE;
                $classMap = self::createClassMap(__DIR__ . '/Drivers');
                $driverList = [];

                foreach ($classMap as $class => $file) {
                    $driverList[] = \str_replace($prefix, '', \substr($class, 0, \strrpos($class, '\\')));
                }

                $driverList = \array_values(\array_unique($driverList));
            }

            $driverList = \array_merge($driverList, \array_keys(self::$driverCustoms));

            if ($FQCNAsKey) {
                $realDriverList = [];
                foreach ($driverList as $driverName) {
                    $realDriverList[self::getDriverClass($driverName)] = $driverName;
                }
                $driverList = $realDriverList;
            }

            \asort($driverList);

            return $driverList;
        }

        throw new PhpfastcacheUnsupportedOperationException('Cannot get the driver list if the default namespace path has changed.');
    }
public static function getDriverList ( bool $ FQCNAsKey = false ) : array { static $ driverList ; if ( self :: getDefaultNamespacePath ( ) === self :: getNamespacePath ( ) ) { if ( $ driverList === null ) { $ prefix = self :: CORE_DRIVER_NAMESPACE ; $ classMap = self :: createClassMap ( __DIR__ . '/Drivers' ) ; $ driverList = [ ] ; foreach ( $ classMap as $ class => $ file ) { $ driverList [ ] = \ str_replace ( $ prefix , '' , \ substr ( $ class , 0 , \ strrpos ( $ class , '\\' ) ) ) ; } $ driverList = \ array_values ( \ array_unique ( $ driverList ) ) ; } $ driverList = \ array_merge ( $ driverList , \ array_keys ( self :: $ driverCustoms ) ) ; if ( $ FQCNAsKey ) { $ realDriverList = [ ] ; foreach ( $ driverList as $ driverName ) { $ realDriverList [ self :: getDriverClass ( $ driverName ) ] = $ driverName ; } $ driverList = $ realDriverList ; } \ asort ( $ driverList ) ; return $ driverList ; } throw new PhpfastcacheUnsupportedOperationException ( 'Cannot get the driver list if the default namespace path has changed.' ) ; }
Return the list of available drivers Capitalized
with optional FQCN as key

@param bool $FQCNAsKey Describe keys with Full Qualified Class Name
@return string[]
@throws PhpfastcacheUnsupportedOperationException
Return the list of available drivers Capitalized with optional FQCN as key