AssetManifestCommandBase
abstract class AssetManifestCommandBase extends CommandBase
Base class for all command of the g6k:assets namespace.
Properties
protected string | $name | from CommandBase | |
protected string | $version | from CommandBase | |
protected array|false | $parameters | from CommandBase | |
protected string | $projectDir | from CommandBase | |
protected string | $publicDir | from CommandBase | |
protected Translator | $translator | from CommandBase | |
protected bool | $initialized | from CommandBase | |
protected bool | $html | from CommandBase | |
protected array|null | $manifest |
Methods
No description
This function parses the '.env' file and returns an array of parameters
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
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
No description
No description
No description
No description
No description
Adds a file to the manifest.
Processes a file
Try to add a file to the manifest.
Adds version number to path
Increments version of an asset
Details
at line 46
__construct(string $projectDir, string $name = "Asset manifest editor")
in CommandBase at line 111
private void
doInitialization()
Realizes the initialization this command
in CommandBase at line 136
private array|false
getParameters()
This function parses the '.env' file and returns an array of parameters
in CommandBase at line 169
private string
getParameterValue(string $parameter)
Returns the value of a parameter
in CommandBase at line 184
protected string
getConfigParameter(string $parameter)
Gets a parameter with its name.
in CommandBase at line 194
protected void
configure()
Configures the current command.
in CommandBase at line 228
protected void
initialize(InputInterface $input, OutputInterface $output)
initializes the current command.
in CommandBase 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.
in CommandBase at line 285
protected int|null
execute(InputInterface $input, OutputInterface $output)
Executes the current command.
in CommandBase at line 307
protected bool
runEmbeddedCommand(array $command, InputInterface $input, OutputInterface $output)
Run an embedded console command.
in CommandBase at line 325
protected DOMElement|null
castDOMElement(DOMNode $node)
Casts a DOMNode to DOMElement
in CommandBase at line 341
protected DOMElement|null
getDOMElementItem(DOMNodeList $nodes, int $index)
Retuns the DOMElement at position $index of the DOMNodeList
in CommandBase at line 357
protected string
resolvePath(string $path, string $base)
Converts a relative path of a file to an absolute path
in CommandBase 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
in CommandBase at line 438
protected string|int
findAssetsDirectory(string $in, InputInterface $input, OutputInterface $output)
Finds the assets directory
in CommandBase at line 482
protected string|int
findTemplatesDirectory(string $in, InputInterface $input, OutputInterface $output)
Finds the templates directory
in CommandBase at line 526
protected string|int
findPDFFormsDirectory(string $in, InputInterface $input, OutputInterface $output)
Finds the pdf forms directory
in CommandBase at line 570
protected string|int
findSimulatorsDirectory(string $in, InputInterface $input, OutputInterface $output)
Finds the simulators directory
in CommandBase at line 611
protected bool
isHtml()
Returns true, if the message are displayed in HTML, false if not.
in CommandBase 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
in CommandBase at line 647
protected void
info(OutputInterface $output, string $message, array $parameters = [])
Displays an info message
in CommandBase at line 664
protected void
warning(OutputInterface $output, string $message, array $parameters = [])
Displays a warning message
in CommandBase at line 681
protected void
success(OutputInterface $output, string $message, array $parameters = [])
Displays a success message
in CommandBase at line 698
protected void
failure(OutputInterface $output, string $message, array $parameters = [])
Displays a failure message
in CommandBase at line 715
protected void
fatal(OutputInterface $output, string $message, array $parameters = [])
Displays an fatal error message
in CommandBase at line 732
protected void
error(OutputInterface $output, string $message, array $parameters = [])
Displays an error message
in CommandBase at line 749
protected void
debug(OutputInterface $output, string $message, array $parameters = [])
Displays a debug message
in CommandBase at line 762
protected void
comment(OutputInterface $output, string $message, array $parameters = [])
Displays a comment
at line 54
protected string
getCommandName()
at line 61
protected string
getCommandDescription()
at line 68
protected string
getCommandHelp()
at line 75
protected array
getCommandArguments()
at line 82
protected array
getCommandOptions()
at line 94
abstract protected bool
addFile(string $file, OutputInterface $output)
Adds a file to the manifest.
at line 104
abstract protected bool
processFile(string $file, OutputInterface $output)
Processes a file
at line 114
protected bool
tryToAddFile(string $file, OutputInterface $output)
Try to add a file to the manifest.
at line 177
protected string
versionize(string $path, string $version)
Adds version number to path
at line 193
protected string
incrementVersion(string $version)
Increments version of an asset