1
0
mirror of synced 2024-12-14 07:06:04 +03:00
This commit is contained in:
zYne 2007-06-25 17:01:29 +00:00
parent 83128e79b4
commit efea8acc66

View File

@ -46,14 +46,13 @@ class Doctrine_Import_Xml
* @param string $schema The file containing the XML schema * @param string $schema The file containing the XML schema
* @param string $directory The directory where the Doctrine_Record classes will * @param string $directory The directory where the Doctrine_Record classes will
* be written * be written
* @static
*/ */
public function importObj($schema, $directory) public function importObj($schema, $directory)
{ {
$Builder = new Doctrine_Import_Builder(); $builder = new Doctrine_Import_Builder();
$Builder->setTargetPath($directory); $builder->setTargetPath($directory);
$Arr = self::importArr($schema); $arr = self::importArr($schema);
foreach ($arr as $name => $columns) { foreach ($arr as $name => $columns) {
$Builder->buildRecord($name, $columns); $Builder->buildRecord($name, $columns);
@ -68,9 +67,8 @@ class Doctrine_Import_Xml
* *
* @param string $schema Path to the file containing the XML schema * @param string $schema Path to the file containing the XML schema
* @return array * @return array
* @static
*/ */
public static function importArr($schema) public function importArr($schema)
{ {
if (!is_readable($schema)) { if (!is_readable($schema)) {
throw new Doctrine_Import_Exception('Could not read schema file '. $schema); throw new Doctrine_Import_Exception('Could not read schema file '. $schema);