CommandBase
abstract class CommandBase extends Command
Base class for all command of the g6k namespace.
Properties
protected string | $name | ||
protected string | $version | ||
protected array|false | $parameters | ||
protected string | $projectDir | ||
protected string | $publicDir | ||
protected Translator | $translator | ||
protected bool | $initialized | ||
protected bool | $html |
Methods
The constructor for the command
Realizes the initialization this command
This function parses the '.env' file and returns an array of parameters
Returns the value of a parameter
Gets a parameter with its name.
Configures the current command.
initializes the current command.
Asks an argument if it's not supplied in the command line.
Executes the current command.
Run an embedded console command.
Retuns the DOMElement at position $index of the DOMNodeList
Converts a relative path of a file to an absolute path
Finds files in the subdirectories of a giving directory
Finds the assets directory
Finds the templates directory
Finds the pdf forms directory
Finds the simulators directory
Returns true, if the message are displayed in HTML, false if not.
Displays an message
Displays an info message
Displays a warning message
Displays a success message
Displays a failure message
Displays an fatal error message
Displays an error message
Displays a debug message
Displays a comment
Returns the name of the current command
Returns the description of the current command
Returns the help text of the current command
Returns the arguments of the current command
Returns the options of the current command
Details
at line 97
__construct(string $projectDir, string $name)
The constructor for the command
at line 111
private void
doInitialization()
Realizes the initialization this command
at line 136
private array|false
getParameters()
This function parses the '.env' file and returns an array of parameters
at line 169
private string
getParameterValue(string $parameter)
Returns the value of a parameter
at line 184
protected string
getConfigParameter(string $parameter)
Gets a parameter with its name.
at line 194
protected void
configure()
Configures the current command.
at line 228
protected void
initialize(InputInterface $input, OutputInterface $output)
initializes the current command.
at line 259
protected void
askArgument(InputInterface $input, OutputInterface $output, string $argumentName, string $questionText)
Asks an argument if it's not supplied in the command line.
at line 285
protected int|null
execute(InputInterface $input, OutputInterface $output)
Executes the current command.
at line 307
protected bool
runEmbeddedCommand(array $command, InputInterface $input, OutputInterface $output)
Run an embedded console command.
at line 325
protected DOMElement|null
castDOMElement(DOMNode $node)
Casts a DOMNode to DOMElement
at line 341
protected DOMElement|null
getDOMElementItem(DOMNodeList $nodes, int $index)
Retuns the DOMElement at position $index of the DOMNodeList
at line 357
protected string
resolvePath(string $path, string $base)
Converts a relative path of a file to an absolute path
at line 385
protected array
findFile(string $in, string $name, InputInterface $input, OutputInterface $output, array $filters = [])
Finds files in the subdirectories of a giving directory
at line 438
protected string|int
findAssetsDirectory(string $in, InputInterface $input, OutputInterface $output)
Finds the assets directory
at line 482
protected string|int
findTemplatesDirectory(string $in, InputInterface $input, OutputInterface $output)
Finds the templates directory
at line 526
protected string|int
findPDFFormsDirectory(string $in, InputInterface $input, OutputInterface $output)
Finds the pdf forms directory
at line 570
protected string|int
findSimulatorsDirectory(string $in, InputInterface $input, OutputInterface $output)
Finds the simulators directory
at line 611
protected bool
isHtml()
Returns true, if the message are displayed in HTML, false if not.
at line 627
private void
message(OutputInterface $output, string $message, array $parameters = [], string $start = 'info', string $end = 'info', int $verbosity = OutputInterface::VERBOSITY_NORMAL)
Displays an message
at line 647
protected void
info(OutputInterface $output, string $message, array $parameters = [])
Displays an info message
at line 664
protected void
warning(OutputInterface $output, string $message, array $parameters = [])
Displays a warning message
at line 681
protected void
success(OutputInterface $output, string $message, array $parameters = [])
Displays a success message
at line 698
protected void
failure(OutputInterface $output, string $message, array $parameters = [])
Displays a failure message
at line 715
protected void
fatal(OutputInterface $output, string $message, array $parameters = [])
Displays an fatal error message
at line 732
protected void
error(OutputInterface $output, string $message, array $parameters = [])
Displays an error message
at line 749
protected void
debug(OutputInterface $output, string $message, array $parameters = [])
Displays a debug message
at line 762
protected void
comment(OutputInterface $output, string $message, array $parameters = [])
Displays a comment
at line 772
abstract protected string
getCommandName()
Returns the name of the current command
at line 781
abstract protected string
getCommandDescription()
Returns the description of the current command
at line 790
abstract protected string
getCommandHelp()
Returns the help text of the current command
at line 799
abstract protected array
getCommandArguments()
Returns the arguments of the current command
at line 808
abstract protected array
getCommandOptions()
Returns the options of the current command