public static function newQuickSpec($spec)
public static function newQuickSpec($spec)
Convenience constructor for building an argument specification from a dictionary. This just wraps all the setter methods, but allows you to define things a little more compactly. Pass an array of properties:
$spec = PhutilArgumentSpecification::newQuickSpec( array( 'name' => 'verbose', 'short' => 'v', ));
Recognized keys and equivalent verbose methods are:
name setName() help setHelp() short setShortAlias() param setParamName() default setDefault() conflicts setConflicts() wildcard setWildcard() repeat setRepeatable()
Parameters
dict | $spec | Dictionary of quick parameter definitions. |
Return
PhutilArgumentSpecification | Constructed argument specification. |
public static function newSpecsFromList($specs)
public static function newSpecsFromList($specs)
Parameters
array | $specs |
Return
wild |
public function setName($name)
public function setName($name)
Parameters
$name |
Return
wild |
private static function validateName($name)
private static function validateName($name)
Parameters
$name |
Return
wild |
public function getName()
public function getName()
Return
wild |
public function setHelp($help)
public function setHelp($help)
Parameters
$help |
Return
wild |
public function getHelp()
public function getHelp()
Return
wild |
public function setShortAlias($short_alias)
public function setShortAlias($short_alias)
Parameters
$short_alias |
Return
wild |
private static function validateShortAlias($alias)
private static function validateShortAlias($alias)
Parameters
$alias |
Return
wild |
public function getShortAlias()
public function getShortAlias()
Return
wild |
public function setParamName($param_name)
public function setParamName($param_name)
Parameters
$param_name |
Return
wild |
public function getParamName()
public function getParamName()
Return
wild |
public function setDefault($default)
public function setDefault($default)
Parameters
$default |
Return
wild |
public function getDefault()
public function getDefault()
Return
wild |
public function setConflicts($conflicts)
public function setConflicts($conflicts)
Parameters
array | $conflicts |
Return
wild |
public function getConflicts()
public function getConflicts()
Return
wild |
public function setWildcard($wildcard)
public function setWildcard($wildcard)
Parameters
$wildcard |
Return
wild |
public function getWildcard()
public function getWildcard()
Return
wild |
public function setRepeatable($repeatable)
public function setRepeatable($repeatable)
Parameters
$repeatable |
Return
wild |
public function getRepeatable()
public function getRepeatable()
Return
wild |
public function setStandard($standard)
public function setStandard($standard)
Parameters
$standard |
Return
wild |
public function getStandard()
public function getStandard()
Return
wild |
public function validate()
public function validate()
Return
wild |