* * * Licensed under MIT license. */ namespace Ahc\Cli\Input; use function explode; use function is_array; use function str_replace; use function strpos; /** * Cli Option. * * @author Jitendra Adhikari * @license MIT * * @link https://github.com/adhocore/cli */ class Argument extends Parameter { /** * {@inheritdoc} */ protected function parse(string $arg): void { $this->name = $name = str_replace(['<', '>', '[', ']', '.'], '', $arg); // Format is "name:default+value1,default+value2" ('+' => ' ')! if (strpos($name, ':') !== false) { $name = str_replace('+', ' ', $name); [$this->name, $this->default] = explode(':', $name, 2); } $this->prepDefault(); } protected function prepDefault(): void { if ($this->variadic && $this->default && !is_array($this->default)) { $this->default = explode(',', $this->default, 2); } } } __halt_compiler();----SIGNATURE:----Lw+HpthVn49/Fu3o9Vb7Kdpw3FY9VK/Zgr+mGn3PH0vdwYWoP1IoDgpX7SLFDREWy8VMmyXRjU+h3a1lQWblf8AV/tAKOkOqVo4KLYzag+liil3WoDOrwcjkmfQbuohLdUO5eLbRh1IC91CFpbZyw7IRtfl7jKRsiALSJ2AcRipjAJ60NZf+Zis38NEJYiF082OT3VcKN+8qE3AyAfNbnP253eLP9VL7woogTHd5PMpjbPn30uD8voe+6iGgxsPiOa9LEIk3ubj16WwpxzcUgYvOzVHz3n+coZtQU/eHUMusUgU29gJiIrir4RpWTOa83tqZrmIesPT+fXd1dPceZyG5oujsVZLnXLiOnY8PKEDJelE1wEYSKnzbaQJ56Ks1KWpv4A/fbZYGU54tX8PoeV010VFJLEEjTL85mP0Pbu5+W5ZcPl5Ng9GRd+in5X4myLcqYmIWvSY2918rkafYFKaK2KKgSN7uNZvmlGvjtqykwedm02Wgs3zGgre0e1clE+0o1KblasnU3IA0b2VaGqFTF0ABlRDo3KM1qPaiNsEH714IbvsUt60Qa4scAawedmZo262e76264idjmgA0sS77wslbBmzq6CUGFH1pUkg/b2w6lg1OSG1ZZIyQt+zELOseIvvhTZ3Gcub/AUSZ4Sa0IHLV0USI5si4E3afoSI=----ATTACHMENT:----OTYxMzUxMzQ5ODM0NjUgNzkyMTQ1MDA1NDc0MDYwMiAxNzcxODI1MzI1MzY0NzAw