Class CommandScanner
Used by CommandCollection and CommandTask to scan the filesystem for command classes.
Namespace: Cake\Console
Method Summary
-
scanAll() public
Scan CakePHP core, the applications and plugins for shell classes
-
scanDir() protected
Scan a directory for .php files and return the class names that should be within them.
Method Detail
scanAll() ¶ public
scanAll(): array
Scan CakePHP core, the applications and plugins for shell classes
Returns
array
scanDir() ¶ protected
scanDir(string $path, string $namespace, string $prefix, array $hide): array
Scan a directory for .php files and return the class names that should be within them.
Parameters
-
string
$path The directory to read.
-
string
$namespace The namespace the shells live in.
-
string
$prefix The prefix to apply to commands for their full name.
-
array
$hide A list of command names to hide as they are internal commands.
Returns
array