Changeset View
Changeset View
Standalone View
Standalone View
src/parser/argument/PhutilArgumentParser.php
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | /* -( Parsing Arguments )-------------------------------------------------- */ | ||||
* @{class:PhutilArgumentSpecification}. | * @{class:PhutilArgumentSpecification}. | ||||
* @return this | * @return this | ||||
* @task parse | * @task parse | ||||
*/ | */ | ||||
public function parsePartial(array $specs) { | public function parsePartial(array $specs) { | ||||
return $this->parseInternal($specs, false); | return $this->parseInternal($specs, false); | ||||
} | } | ||||
/** | |||||
* @return this | |||||
*/ | |||||
private function parseInternal(array $specs, $correct_spelling) { | private function parseInternal(array $specs, $correct_spelling) { | ||||
$specs = PhutilArgumentSpecification::newSpecsFromList($specs); | $specs = PhutilArgumentSpecification::newSpecsFromList($specs); | ||||
$this->mergeSpecs($specs); | $this->mergeSpecs($specs); | ||||
$specs_by_name = mpull($specs, null, 'getName'); | $specs_by_name = mpull($specs, null, 'getName'); | ||||
$specs_by_short = mpull($specs, null, 'getShortAlias'); | $specs_by_short = mpull($specs, null, 'getShortAlias'); | ||||
unset($specs_by_short[null]); | unset($specs_by_short[null]); | ||||
▲ Show 20 Lines • Show All 784 Lines • Show Last 20 Lines |