* * * 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:----v9BL8UJ3ig6kehM/wHx+p49JJNeqLZwX4uA93fo45CFE0lClzaFDHo9rPEdR7CvoH2yJMaok4M+24Vx7LPYma0rmed1vymOI54rNXEDf9+z2k27CClFLdjIdGFPdz34kOQGYwnbWHCOQsqD9qm4Yt3GyHmlvHdJajW7LJYR+Bh/FrKk9u6WlQj7O18DDvyLyX7qT3AoUnPLPemDXYjpv7K94MLhjlvvmJo9N5ppn3XLAG+IjndY4h65I/QBCYm7NkLHmGBm0eBhmM4TaZbPNbQjFBFBoAymSkllBucOKiqzDNZ91dRi+m1g04iqYU35gYr1Cm/hrk/ei9XusmLR7PaDHe6tktQIhKaI/pdhtNVogE2XXrM9m/259S+3X0FgO9LtVuoc9ihCps6VW1ZydlvpDf46dwPS1gJ0sQBIZdHEIQi/i7KrxaVC2wTFo9UI4Lv9SnhfNKzeZF147SrGWyhNxJKyKfwyGWr5cgZvJQoIBVmqyIZ2YmYMhhw8ekKAJuQhzp2sl8wJiC3d1aOW9yZ2e1qmm+u0nDAmOHY2laIkRGvWEEJ0aKWajBenW/8VB58JlJqQZd+AfXaPEdaf6mZls1YlC7RPXIKsmpTRvZ1FGFIzkvwi6APrq8IzJMfI4UjUzO/79CAuxtdociY/R+hWlnYA5JWiPQFWGxsgUpwI=----ATTACHMENT:----NjExMjA5NzkzNDA1ODQ1MSA2OTU0NjE4NjQyNDMyMzgyIDQwNjI0NjMwNjQ4ODQ1NDI=