Свойство | Тип | Описание | |
---|---|---|---|
$addonAuthorName | string | Author name for generated addons | |
$addonAuthorUrl | string | Author url for generated addons | |
$config | array | Configuration items | |
$craftPath | string | Path to the craft folder | |
$hasValidCraftPath | boolean | Whether the craft folder has been set/guessed correctly | |
$userDefinedCommandDirs | array | A list of Command dirs | |
$userDefinedCommands | array | A list of Command objects | |
$vendorPath | string | Path to the Composer vendor folder |
Метод | Описание | |
---|---|---|
__construct ( $vendorPath = null ) | ||
addComposerCommands ( ) : void | Find any Command plugins installed via composer or supplied by the main composer.json and add them to the Application | |
addComposerPlugins ( ) : void | Find any Command plugins installed via composer and add them to the Application | |
addCustomComposerCommands ( ) : void | Find any Command plugins upplied by the main composer.json and add them to the Application | |
addUserDefinedCommands ( ) : void | Find any user-defined Commands in the config and add them to the Application | |
bootstrap ( ) : Craft\ConsoleApp | Boot up craft | |
canBeBootstrapped ( ) : boolean | Whether or not a valid system folder was found | |
findClassInDir ( string $subclassOf, string $dir, string $namespace = null ) : array | Get a list of classes in the specified directory | |
findCommandsInDir ( string $dir, string $namespace = null ) : array | Get a list of Symfony Console Commands classes in the specified directory | |
getAddonAuthorName ( ) : string | Get the default addon author name | |
getAddonAuthorUrl ( ) : string | Get the default addon author URL | |
getComposerConfig ( ) : array | Get craft-cli configuration stored in the root composer.json | |
getConfig ( ) : array | Get all configuration items | |
getConfigItem ( string $key ) : mixed | Get the specified config item | |
getCraftFolder ( ) : string | Get the name of the craft folder | |
getCraftPath ( ) : string | Get the path to the craft folder | |
onCommand ( Symfony\Component\Console\Event\ConsoleCommandEvent $event ) : void | On Command Event Handler | |
registerCommand ( string | callable $class ) : void | Add a command to the Application by class name or callback that return a Command class | |
setVendorPath ( string $vendorPath ) | Set the path to the Composer vendor folder |
Метод | Описание | |
---|---|---|
findConfigFile ( string | null $dir = null ) : string | null | Traverse up a directory to find a config file | |
getEnvironmentOption ( ) : string | null | Get the environment from the --environment option or from the CRAFT_ENVIRONMENT env variable | |
isCommandExemptFromBootstrap ( |
Check whether a command should be exempt from bootstrapping | |
loadConfig ( ) : void | Looks for ~/.craft-cli.php and ./.craft-cli.php and combines them into an array |
public addComposerCommands ( ) : void | ||
Результат | void |
public addComposerPlugins ( ) : void | ||
Результат | void |
public addCustomComposerCommands ( ) : void | ||
Результат | void |
public addUserDefinedCommands ( ) : void | ||
Результат | void |
public bootstrap ( ) : Craft\ConsoleApp | ||
Результат | Craft\ConsoleApp |
public canBeBootstrapped ( ) : boolean | ||
Результат | boolean |
public getAddonAuthorName ( ) : string | ||
Результат | string |
public getAddonAuthorUrl ( ) : string | ||
Результат | string |
public getComposerConfig ( ) : array | ||
Результат | array |
public getConfigItem ( string $key ) : mixed | ||
$key | string | |
Результат | mixed |
public getCraftFolder ( ) : string | ||
Результат | string |
public getCraftPath ( ) : string | ||
Результат | string |
protected getEnvironmentOption ( ) : string | null | ||
Результат | string | null |
protected isCommandExemptFromBootstrap ( |
||
$command | ||
Результат | boolean |
protected loadConfig ( ) : void | ||
Результат | void |
public setVendorPath ( string $vendorPath ) | ||
$vendorPath | string |
protected string $addonAuthorName | ||
Результат | string |
protected string $addonAuthorUrl | ||
Результат | string |
protected string $craftPath | ||
Результат | string |
protected bool $hasValidCraftPath | ||
Результат | boolean |
protected array $userDefinedCommandDirs | ||
Результат | array |
protected array $userDefinedCommands | ||
Результат | array |
protected string $vendorPath | ||
Результат | string |