PHP 클래스 CraftCli\Command\Command

상속: extends Symfony\Component\Console\Command\Command, implements CraftCli\Command\NeedsCraftInterface
파일 보기 프로젝트 열기: rsanchez/craft-cli

보호된 프로퍼티들

프로퍼티 타입 설명
$appPath string Craft app path
$basePath string Craft base path
$configPath string Craft config path
$craft Craft\ConsoleApp Craft app instance
$description string The console command description.
$input Symfony\Component\Console\Input\InputInterface The input interface implementation.
$name string The console command name.
$output Symfony\Component\Console\Style\StyleInterface The output interface implementation.
$pluginsPath string Craft plugins path
$showsDuration boolean Whether to show the command's duration after the command finishes
$storagePath string Craft storage path
$templatesPath string Craft templates path
$translationsPath string Craft translations path

공개 메소드들

메소드 설명
anticipate ( string $question, array $choices, string $default = null ) : string Prompt the user for input with auto completion.
argument ( string $key = null ) : string | array Get the value of a command argument.
ask ( string $question, string $default = null ) : string Prompt the user for input.
askWithCompletion ( string $question, array $choices, string $default = null ) : string Prompt the user for input with auto completion.
choice ( string $question, array $choices, string $default = null, mixed $attempts = null, boolean $multiple = null ) : boolean Give the user a single choice from an array of answers.
comment ( string $string ) : void Write a string as comment output.
confirm ( string $question, boolean $default = false ) : boolean Confirm a question with the user.
error ( string $string ) : void Write a string as error output.
info ( string $string ) : void Write a string as information output.
line ( string $string ) : void Write a string as standard output.
option ( string $key = null ) : string | array Get the value of a command option.
question ( string $string ) : void Write a string as question output.
run ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer Run the console command.
secret ( string $question, boolean $fallback = true ) : string Prompt the user for input but hide the answer from the console.
setAppPath ( $path )
setBasePath ( $path )
setConfigPath ( $path )
setCraft ( Craft\ConsoleApp $craft )
setEnvironment ( $environment )
setPluginsPath ( $path )
setStoragePath ( $path )
setTemplatesPath ( $path )
setTranslationsPath ( $path )
table ( array $headers, array $rows, string $style = 'default' ) : void Format input to textual table.
warn ( string $string ) : void Write a string as warning output.

보호된 메소드들

메소드 설명
configure ( ) : void Specify the arguments and options on the command.
execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : mixed Execute the console command.
fire ( ) : mixed Execute the console command.
getArguments ( ) : array Get the console command arguments.
getOptions ( ) : array Get the console command options.
suppressOutput ( callable $callback ) : mixed Useful for supressing log messages

메소드 상세

anticipate() 공개 메소드

Prompt the user for input with auto completion.
public anticipate ( string $question, array $choices, string $default = null ) : string
$question string
$choices array
$default string
리턴 string

argument() 공개 메소드

Get the value of a command argument.
public argument ( string $key = null ) : string | array
$key string
리턴 string | array

ask() 공개 메소드

Prompt the user for input.
public ask ( string $question, string $default = null ) : string
$question string
$default string
리턴 string

askWithCompletion() 공개 메소드

Prompt the user for input with auto completion.
public askWithCompletion ( string $question, array $choices, string $default = null ) : string
$question string
$choices array
$default string
리턴 string

choice() 공개 메소드

Give the user a single choice from an array of answers.
public choice ( string $question, array $choices, string $default = null, mixed $attempts = null, boolean $multiple = null ) : boolean
$question string
$choices array
$default string
$attempts mixed
$multiple boolean
리턴 boolean

comment() 공개 메소드

Write a string as comment output.
public comment ( string $string ) : void
$string string
리턴 void

configure() 보호된 메소드

Specify the arguments and options on the command.
protected configure ( ) : void
리턴 void

confirm() 공개 메소드

Confirm a question with the user.
public confirm ( string $question, boolean $default = false ) : boolean
$question string
$default boolean
리턴 boolean

error() 공개 메소드

Write a string as error output.
public error ( string $string ) : void
$string string
리턴 void

execute() 보호된 메소드

Execute the console command.
protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : mixed
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
리턴 mixed

fire() 보호된 메소드

Execute the console command.
protected fire ( ) : mixed
리턴 mixed

getArguments() 보호된 메소드

Get the console command arguments.
protected getArguments ( ) : array
리턴 array

getOptions() 보호된 메소드

Get the console command options.
protected getOptions ( ) : array
리턴 array

info() 공개 메소드

Write a string as information output.
public info ( string $string ) : void
$string string
리턴 void

line() 공개 메소드

Write a string as standard output.
public line ( string $string ) : void
$string string
리턴 void

option() 공개 메소드

Get the value of a command option.
public option ( string $key = null ) : string | array
$key string
리턴 string | array

question() 공개 메소드

Write a string as question output.
public question ( string $string ) : void
$string string
리턴 void

run() 공개 메소드

Run the console command.
public run ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
리턴 integer

secret() 공개 메소드

Prompt the user for input but hide the answer from the console.
public secret ( string $question, boolean $fallback = true ) : string
$question string
$fallback boolean
리턴 string

setAppPath() 공개 메소드

public setAppPath ( $path )

setBasePath() 공개 메소드

public setBasePath ( $path )

setConfigPath() 공개 메소드

public setConfigPath ( $path )

setCraft() 공개 메소드

public setCraft ( Craft\ConsoleApp $craft )
$craft Craft\ConsoleApp

setEnvironment() 공개 메소드

public setEnvironment ( $environment )

setPluginsPath() 공개 메소드

public setPluginsPath ( $path )

setStoragePath() 공개 메소드

public setStoragePath ( $path )

setTemplatesPath() 공개 메소드

public setTemplatesPath ( $path )

setTranslationsPath() 공개 메소드

public setTranslationsPath ( $path )

suppressOutput() 보호된 메소드

Useful for supressing log messages
protected suppressOutput ( callable $callback ) : mixed
$callback callable
리턴 mixed

table() 공개 메소드

Format input to textual table.
public table ( array $headers, array $rows, string $style = 'default' ) : void
$headers array
$rows array
$style string
리턴 void

warn() 공개 메소드

Write a string as warning output.
public warn ( string $string ) : void
$string string
리턴 void

프로퍼티 상세

$appPath 보호되어 있는 프로퍼티

Craft app path
protected string $appPath
리턴 string

$basePath 보호되어 있는 프로퍼티

Craft base path
protected string $basePath
리턴 string

$configPath 보호되어 있는 프로퍼티

Craft config path
protected string $configPath
리턴 string

$craft 보호되어 있는 프로퍼티

Craft app instance
protected ConsoleApp,Craft $craft
리턴 Craft\ConsoleApp

$description 보호되어 있는 프로퍼티

The console command description.
protected string $description
리턴 string

$input 보호되어 있는 프로퍼티

The input interface implementation.
protected InputInterface,Symfony\Component\Console\Input $input
리턴 Symfony\Component\Console\Input\InputInterface

$name 보호되어 있는 프로퍼티

The console command name.
protected string $name
리턴 string

$output 보호되어 있는 프로퍼티

The output interface implementation.
protected StyleInterface,Symfony\Component\Console\Style $output
리턴 Symfony\Component\Console\Style\StyleInterface

$pluginsPath 보호되어 있는 프로퍼티

Craft plugins path
protected string $pluginsPath
리턴 string

$showsDuration 보호되어 있는 프로퍼티

Whether to show the command's duration after the command finishes
protected bool $showsDuration
리턴 boolean

$storagePath 보호되어 있는 프로퍼티

Craft storage path
protected string $storagePath
리턴 string

$templatesPath 보호되어 있는 프로퍼티

Craft templates path
protected string $templatesPath
리턴 string

$translationsPath 보호되어 있는 프로퍼티

Craft translations path
protected string $translationsPath
리턴 string