public function toArray($recursive = true)
    {
        $values = $this->values;

        if (!$recursive) {
            return $values;
        }

        foreach ($values as $key => $value) {
            if (gettype($value) === 'object') {
                if ($value instanceof Hash) {
                    $value = $value->toArray($recursive);
                }
            }

            $values[$key] = $value;
        }

        return $values;
    }
public function toArray($recursive = true)
    {
        $values = $this->values;

        if (!$recursive) {
            return $values;
        }

        foreach ($values as $key => $value) {
            if (gettype($value) === 'object') {
                if ($value instanceof Hash) {
                    $value = $value->toArray($recursive);
                }
            }

            $values[$key] = $value;
        }

        return $values;
    }
public function toArray ( $ recursive = true ) { $ values = $ this -> values ; if ( ! $ recursive ) { return $ values ; } foreach ( $ values as $ key => $ value ) { if ( gettype ( $ value ) === 'object' ) { if ( $ value instanceof Hash ) { $ value = $ value -> toArray ( $ recursive ) ; } } $ values [ $ key ] = $ value ; } return $ values ; }
Converts hash to array
@param  boolean $recursive defaults to true
@return array
Converts hash to array