File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -374,10 +374,11 @@ public static function getStaticAllDrivers(): array
374374 }
375375
376376 /**
377+ * @param bool $FQNAsKey Describe keys with Full Qualified Class Name
377378 * @return string[]
378379 * @throws PhpfastcacheUnsupportedOperationException
379380 */
380- public static function getDriverList (): array
381+ public static function getDriverList ($ FQCNAsKey = false ): array
381382 {
382383 static $ driverList ;
383384
@@ -396,7 +397,15 @@ public static function getDriverList(): array
396397
397398 $ driverList = \array_merge ($ driverList , \array_keys (self ::$ driverCustoms ));
398399
399- \sort ($ driverList );
400+ if ($ FQCNAsKey ){
401+ $ realDriverList = [];
402+ foreach ($ driverList as $ driverName ){
403+ $ realDriverList [self ::getDriverClass ($ driverName )] = $ driverName ;
404+ }
405+ $ driverList = $ realDriverList ;
406+ }
407+
408+ \asort ($ driverList );
400409
401410 return $ driverList ;
402411 }
You can’t perform that action at this time.
0 commit comments