public function toOutput($structure, $assoc = true)
    {
        switch ($structure) {
            case 'string':
                $output = $this->toString();
                break;
            case 'array':
            default:
                $output = $this->toArray($assoc);
                break;
        }
        return $output;
    }