\Cake\ConsoleCommandScanner

Used by CommandCollection and CommandTask to scan the filesystem for command classes.

Summary

Methods
Properties
Constants
scanCore()
scanApp()
scanPlugin()
No public properties found
No constants found
scanDir()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

scanCore()

scanCore() : array

Scan CakePHP internals for shells & commands.

Returns

array —

A list of command metadata.

scanApp()

scanApp() : array

Scan the application for shells & commands.

Returns

array —

A list of command metadata.

scanPlugin()

scanPlugin(string  $plugin) : array

Scan the named plugin for shells and commands

Parameters

string $plugin

The named plugin.

Returns

array —

A list of command metadata.

scanDir()

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 —

The list of shell info arrays based on scanning the filesystem and inflection.