Doctrine_Record::exportTo PHP Метод

exportTo() публичный Метод

exports instance to a chosen format
public exportTo ( string $type, string $deep = true ) : string
$type string format type: array, xml, yml, json
$deep string whether or not to export all relationships
Результат string representation as $type format. Array is $type is array
    public function exportTo($type, $deep = true)
    {
        if ($type == 'array') {
            return $this->toArray($deep);
        } else {
            return Doctrine_Parser::dump($this->toArray($deep, true), $type);
        }
    }