Page MenuHomePhorge
Diviner libphutil Tech Docs PhutilArgumentSpecification

final class PhutilArgumentSpecification
libphutil Technical Documentation (Parsers)

This class is not documented.

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

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