PHP Class Mmoreram\PHPFormatter\Loader\ConfigLoader

显示文件 Open project: mmoreram/php-formatter Class Usage Examples

Public Methods

Method Description
loadConfigValue ( string $commandName, array $configValues, array $commandValue = null, array $defaultValue = null ) : array This method parses the config file, if exists, and determines the real option value.
loadConfigValues ( string $commandName, array $configValues, array $commandValues = [], array $defaultValues = [] ) : array This method parses the config file, if exists, and determines the real options values.

Method Details

loadConfigValue() public method

* If an option is defined as a command parameter, this will be used * Otherwise, if an option is defined in the configuration file, this will be used. * Otherwise, default values will be used
public loadConfigValue ( string $commandName, array $configValues, array $commandValue = null, array $defaultValue = null ) : array
$commandName string Command called
$configValues array Config values
$commandValue array Value defined in command
$defaultValue array Default value to use if this is not defined
return array $usableValues Usable values

loadConfigValues() public method

* If an option is defined as a command parameter, this will be used * Otherwise, if an option is defined in the configuration file, this will be used. * Otherwise, default values will be used
public loadConfigValues ( string $commandName, array $configValues, array $commandValues = [], array $defaultValues = [] ) : array
$commandName string Command called
$configValues array Config values
$commandValues array Values defined in command
$defaultValues array Default values to use if these are not defined
return array $usableValues Usable values