GetOptionKit\OptionCollection::toArray PHP Method

toArray() public method

public toArray ( )
    public function toArray()
    {
        $array = array();
        foreach ($this->data as $k => $spec) {
            $item = array();
            if ($spec->long) {
                $item['long'] = $spec->long;
            }
            if ($spec->short) {
                $item['short'] = $spec->short;
            }
            $item['desc'] = $spec->desc;
            $array[] = $item;
        }
        return $array;
    }