Jelix 1.8.13

InteractiveConfigurator
in package

Tags

Table of Contents

$consoleInput  : InputInterface
$consoleOutput  : OutputInterface
$inputHelpers  : InputHelpers
$questionHelper  : QuestionHelper
$dbProfileProperties  : mixed
__construct()  : mixed
askConfirmation()  : bool
Ask a confirmation.
askDbProfile()  : mixed
Ask parameters to access to a database.
askEntryPoints()  : false|string|array<string|int, string>
Ask to choose an entry point.
askInChoice()  : string|array<string|int, string>
Ask a value from a choice.
askInformation()  : string
Ask a value to the user.
askSecretInformation()  : string
Ask a hidden value to the user, like a password.
askDbProperty()  : mixed

Properties

$dbProfileProperties

private mixed $dbProfileProperties = array('mssql' => array('host', 'database', 'user', 'password', 'persistent'), 'mysqli' => array('host', 'database', 'user', 'password', 'persistent', 'force_encoding', 'ssl'), 'oci' => array(array('dsn', array('host', 'port', 'database')), 'user', 'password', 'persistent'), 'pgsql' => array(array('service', array('host', 'port', 'database', 'user', 'password')), 'persistent', 'force_encoding', 'timeout', 'pg_options', 'search_path', 'single_transaction'), 'sqlite3' => array('database', 'persistent', 'extensions', 'busytimeout'), 'sqlsrv' => array('host', 'database', 'user', 'password', 'force_encoding'))
Tags

Methods

__construct()

public __construct(QuestionHelper $helper, InputInterface $input, OutputInterface $output) : mixed
Parameters
$helper : QuestionHelper
$input : InputInterface
$output : OutputInterface
Tags
Return values
mixed

askConfirmation()

Ask a confirmation.

public askConfirmation(string $questionMessage[, bool $defaultResponse = false ]) : bool
Parameters
$questionMessage : string

the question

$defaultResponse : bool = false

the default response

Tags
Return values
bool

true it the user has confirmed

askDbProfile()

Ask parameters to access to a database.

public askDbProfile([mixed $currentProfileValues = array() ]) : mixed
Parameters
$currentProfileValues : mixed = array()
Tags
Return values
mixed

askEntryPoints()

Ask to choose an entry point.

public askEntryPoints(string $questionMessage, array<string|int, EntryPointConfigurator$entryPointsList[, bool $multipleChoice = false ][, mixed $preselectedChoice = array() ][, string $errorMessage = '%s is an unknown entry points' ]) : false|string|array<string|int, string>
Parameters
$questionMessage : string
$entryPointsList : array<string|int, EntryPointConfigurator>

the list of entry point in which the choice should be made

$multipleChoice : bool = false

true if the user can choose different entry point

$preselectedChoice : mixed = array()
$errorMessage : string = '%s is an unknown entry points'

error message when the user didn't indicate a value from the choice

Tags
Return values
false|string|array<string|int, string>

list of entry points id, selected by the user. returns false if there is no choice

askInChoice()

Ask a value from a choice.

public askInChoice(string $questionMessage, array<string|int, mixed> $choice, int $defaultResponse[, bool $multipleChoice = false ][, string $errorMessage = '%s is invalid' ]) : string|array<string|int, string>
Parameters
$questionMessage : string
$choice : array<string|int, mixed>

list of possible values

$defaultResponse : int

the default value

$multipleChoice : bool = false

true if the user can choose different values

$errorMessage : string = '%s is invalid'

error message when the user didn't indicate a value from the choice

Tags
Return values
string|array<string|int, string>

responses from the user

askInformation()

Ask a value to the user.

public askInformation(string $questionMessage[, false|string $defaultResponse = false ][, false|array<string|int, string> $autoCompleterValues = false ][, null|callable $validator = null ]) : string
Parameters
$questionMessage : string
$defaultResponse : false|string = false
$autoCompleterValues : false|array<string|int, string> = false

list of values for autocompletion

$validator : null|callable = null

function to validate the value. It accepts a string as parameter, should return the value (may be modified), and should throw an exception when the value is invalid.

Tags
Return values
string

the value given by the user

askSecretInformation()

Ask a hidden value to the user, like a password.

public askSecretInformation(string $questionMessage[, false|string $defaultResponse = false ]) : string
Parameters
$questionMessage : string
$defaultResponse : false|string = false
Tags
Return values
string

the value

askDbProperty()

private askDbProperty(mixed $property, mixed &$profile, mixed &$currentProfileValues) : mixed
Parameters
$property : mixed
$profile : mixed
$currentProfileValues : mixed
Tags
Return values
mixed

Search results