Page MenuHomePhabricator
Diviner libphutil Tech Docs PhutilArgumentSpecification

final class PhutilArgumentSpecification
libphutil Technical Documentation (Parsers)

This class is not documented.

Methods

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$specDictionary of quick parameter definitions.
Return
PhutilArgumentSpecificationConstructed argument specification.

public static function newSpecsFromList($specs)

This method is not documented.
Parameters
array$specs
Return
wild

public function setName($name)

This method is not documented.
Parameters
$name
Return
wild

private static function validateName($name)

This method is not documented.
Parameters
$name
Return
wild

public function getName()

This method is not documented.
Return
wild

public function setHelp($help)

This method is not documented.
Parameters
$help
Return
wild

public function getHelp()

This method is not documented.
Return
wild

public function setShortAlias($short_alias)

This method is not documented.
Parameters
$short_alias
Return
wild

private static function validateShortAlias($alias)

This method is not documented.
Parameters
$alias
Return
wild

public function getShortAlias()

This method is not documented.
Return
wild

public function setParamName($param_name)

This method is not documented.
Parameters
$param_name
Return
wild

public function getParamName()

This method is not documented.
Return
wild

public function setDefault($default)

This method is not documented.
Parameters
$default
Return
wild

public function getDefault()

This method is not documented.
Return
wild

public function setConflicts($conflicts)

This method is not documented.
Parameters
array$conflicts
Return
wild

public function getConflicts()

This method is not documented.
Return
wild

public function setWildcard($wildcard)

This method is not documented.
Parameters
$wildcard
Return
wild

public function getWildcard()

This method is not documented.
Return
wild

public function setRepeatable($repeatable)

This method is not documented.
Parameters
$repeatable
Return
wild

public function getRepeatable()

This method is not documented.
Return
wild

public function setStandard($standard)

This method is not documented.
Parameters
$standard
Return
wild

public function getStandard()

This method is not documented.
Return
wild

public function validate()

This method is not documented.
Return
wild