File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -530,6 +530,7 @@ Console Config Options
530530 'default' => [
531531 'directories' => null,
532532 'find_in_namespaces' => false,
533+ 'commands' => null,
533534 'language_instance' => 'default',
534535 'locator_instance' => 'default',
535536 ],
@@ -548,6 +549,14 @@ find_in_namespaces
548549Set ``true `` to find commands in all Commands subdirectories of all namespaces.
549550The default is not to find in namespaces.
550551
552+ commands
553+ """"""""
554+
555+ Sets an array of Fully Qualified Class Names or instances of the
556+ Framework\C LICommand class. By default, no additional classes are set.
557+
558+ These commands are added after searching through namespaces and directories.
559+
551560language_instance
552561"""""""""""""""""
553562
Original file line number Diff line number Diff line change @@ -506,6 +506,11 @@ protected static function setConsole(string $instance) : Console
506506 }
507507 }
508508 }
509+ if (isset ($ config ['commands ' ])) {
510+ foreach ($ config ['commands ' ] as $ command ) {
511+ $ service ->addCommand ($ command );
512+ }
513+ }
509514 return static ::setService ('console ' , $ service , $ instance );
510515 }
511516
Original file line number Diff line number Diff line change 1414 '/unknown ' ,
1515 ],
1616 'find_in_namespaces ' => true ,
17+ 'commands ' => [
18+ Tests \MVC \Commands \Hello::class,
19+ ],
1720 'language_instance ' => 'default ' ,
1821 'locator_instance ' => 'default ' ,
1922 ],
You can’t perform that action at this time.
0 commit comments