* * * 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:----t4P+Nn9Bp5zrn+dYSF75YZ9gPstzy9fHXceVPUsTlKv9GGQQF1nTBbdLE9QvJn8ZJ+NAeROWppeT3xw/L93XNqAhwVKLapSH3woit7BpjPHCVdBsp1vpD+p9JWe3fOy1gDqBOCD6HQCYZgxkBXgrogy5d8niEA+DaWL5DSISokTsuUvDQ/Zp557b9Adq3mVJAS/DVwprOgRBLZ34Yaqme8kZ9SOXdDjzyjk34ZhFWkyWQL0jTca1rOVNvfBLS4EJiHQViScxWsIfGxicBdUs1SIpanHGhfuayjYvNqiVSkjwxFH6sucRyyz+RVi8wRqJOaipMZ+bVUXdAFwFpTC03lZVE5Z4EDjw8WBMMveu3jyB45txOc611wO3eFema3JLXMfH2rKE5kUFf3PxmE2dOgcLN+Iu+Bvi7UiS7fJUqW/1FC3JqOtSelZqiFRej1j2YnD2eQqMZ9bqGX7Qtg0bni4tAw479H39bP8S8gjgEHXds1FnoqPNYHN39e2t2mNJKlimtbZ33tyrOV4HMh5GWuOujhVypVU3b60akOavxuJ+qov3YopdKadoXrTm2qpu8T7wCQlRyzkOi8kuiT0Bh2LfTqOA3qh6vOj5SrdYno0RS+YhY4Wml45OV79fbE/2jsW4QdCt5TSsH2QxJ5zfu8woYw2Ds2vrZQMbFA4Mc9g=----ATTACHMENT:----ODc3MDAyODE2NzM4MjgxNCA0Mjk0MzU5MDI1MjAwNTg3IDEwMzQyMDY0OTA3MDI4MzI=