ImportSimulatorCommand
class ImportSimulatorCommand extends SimulatorCommandBase
Imports a simulator from an exported xml file.
This command allows to import a simulator and eventually, its stylesheets.
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 |
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.
No description
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
Validates the simulator against its schema
Replaces the numeric data source reference by the name of the data source The name of the data source if extracted from the DataSources.xml
Sets the missing new attributes of the schema: - regionale settings (locale, timezone and grouping separator) by those of this platform - pdfFooter flag
Adds a stylesheet to the assets manifest
Checks the argument of the current command (g6k:simulator:import).
Details
at line 46
__construct(string $projectDir)
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.
at line 143
protected int|null
execute(InputInterface $input, OutputInterface $output)
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 53
protected string
getCommandName()
at line 60
protected string
getCommandDescription()
at line 67
protected string
getCommandHelp()
at line 87
protected array
getCommandArguments()
at line 115
protected array
getCommandOptions()
in SimulatorCommandBase at line 97
protected bool
validatesAgainstSchema(DOMDocument $simulator, OutputInterface $output)
Validates the simulator against its schema
in SimulatorCommandBase at line 141
protected bool
fixDatasourcesReference(DOMDocument $simulator, string $path, InputInterface $input, OutputInterface $output)
Replaces the numeric data source reference by the name of the data source The name of the data source if extracted from the DataSources.xml
in SimulatorCommandBase at line 185
protected void
fixNewAttributes(DOMDocument $simulator)
Sets the missing new attributes of the schema: - regionale settings (locale, timezone and grouping separator) by those of this platform - pdfFooter flag
in SimulatorCommandBase at line 231
protected bool
setWidgets(DOMDocument $simulator, array $widgets)
Sets the default widgets
in SimulatorCommandBase at line 299
protected void
addToManifest($assetpath, $output)
Adds a stylesheet to the assets manifest
at line 134
protected void
interact(InputInterface $input, OutputInterface $output)
Checks the argument of the current command (g6k:simulator:import).