Doctrine_Record::importFrom PHP Méthode

importFrom() public méthode

imports data from a chosen format in the current instance
public importFrom ( string $type, string $data, $deep = true ) : void
$type string Format type: xml, yml, json
$data string Data to be parsed and imported
Résultat void
    public function importFrom($type, $data, $deep = true)
    {
        if ($type == 'array') {
            return $this->fromArray($data, $deep);
        } else {
            return $this->fromArray(Doctrine_Parser::load($data, $type), $deep);
        }
    }