PHP Class VersionPress\Tests\Utils\OptionsConventionConverter

ファイルを表示 Open project: versionpress/versionpress Class Usage Examples

Public Methods

Method Description
getCliOptionName ( string $propertyName ) : string Converts 'optionName' to 'option-name', i.e. from property convention to CLI convention
getEnvVarOptionName ( string $propertyName ) : string Converts 'optionName' to 'VP_OPTION_NAME', i.e. from property convention to env var convention

Method Details

getCliOptionName() public static method

Converts 'optionName' to 'option-name', i.e. from property convention to CLI convention
public static getCliOptionName ( string $propertyName ) : string
$propertyName string
return string

getEnvVarOptionName() public static method

Converts 'optionName' to 'VP_OPTION_NAME', i.e. from property convention to env var convention
public static getEnvVarOptionName ( string $propertyName ) : string
$propertyName string
return string