Commit 13d781cb authored by Jonathan.Wage's avatar Jonathan.Wage

Added aliases.

parent 39c3f2e0
......@@ -41,24 +41,7 @@ class Doctrine_Export_Schema_Xml extends Doctrine_Export_Schema
*/
public function build($array)
{
$xml = new SimpleXMLElement();
foreach ($array as $tableName => $fields) {
$table = $xml->addChild('table');
$name = $table->addChild('name', $tableName);
$declaration = $table->addChild('declaration');
foreach ($fields as $fieldName => $properties) {
$field = $declaration->addChild('field');
$field->addChild('name', $fieldName);
foreach ($properties as $key => $value) {
$field->addChild($key, $value);
}
}
}
return $xml->asXml();
return Doctrime_Parser::dump($array, null, 'xml');
}
/**
......
......@@ -41,7 +41,7 @@ class Doctrine_Export_Schema_Yml extends Doctrine_Export_Schema
*/
public function build($array)
{
return var_dump($array);
return Doctrime_Parser::dump($array, null, 'yml');
}
/**
......
......@@ -54,4 +54,24 @@ abstract class Doctrine_Parser
return $parser->dumpData($array, $path);
}
static public function loadXml($path)
{
return self::load($path, 'xml');
}
static public function dumpXml($array, $path = null)
{
return self::dump($array, $path, 'xml');
}
static public function loadYml($path)
{
return self::load($path, 'yml');
}
static public function dumpYml($array, $path = null)
{
return self::dump($array, $path, 'yml');
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment