Commando\Option::__construct PHP Method

__construct() public method

public __construct ( string | integer $name ) : Option
$name string | integer single char name or int index for this option
return Option
    public function __construct($name)
    {
        if (!is_int($name) && empty($name)) {
            throw new \Exception(sprintf('Invalid option name %s: Must be identified by a single character or an integer', $name));
        }
        if (!is_int($name)) {
            $this->type = mb_strlen($name, 'UTF-8') === 1 ? self::TYPE_SHORT : self::TYPE_VERBOSE;
        } else {
            $this->type = self::TYPE_ANONYMOUS;
        }
        $this->name = $name;
    }