kahlan\cli\CommandLine::_parse PHP Méthode

_parse() protected méthode

Helper for parse().
protected _parse ( string $arg ) : array
$arg string A string argument.
Résultat array The parsed argument
    protected function _parse($arg)
    {
        $pos = strpos($arg, '=');
        if ($pos !== false) {
            $name = substr($arg, 0, $pos);
            $value = substr($arg, $pos + 1);
        } else {
            $name = $arg;
            $value = true;
        }
        return [$name, $value];
    }