1
0
mirror of synced 2025-01-18 06:21:40 +03:00
This commit is contained in:
Jonathan.Wage 2007-11-14 01:57:39 +00:00
parent 43c8eba2c7
commit 32c6288179
2 changed files with 11 additions and 11 deletions

View File

@ -67,7 +67,7 @@ abstract class Doctrine_Parser
static public function getParser($type)
{
$class = 'Doctrine_Parser_'.ucfirst($type);
return new $class;
}
@ -84,7 +84,7 @@ abstract class Doctrine_Parser
static public function load($path, $type = 'xml')
{
$parser = self::getParser($type);
return $parser->loadData($path);
}
@ -102,7 +102,7 @@ abstract class Doctrine_Parser
static public function dump($array, $type = 'xml', $path = null)
{
$parser = self::getParser($type);
return $parser->dumpData($array, $path);
}
@ -120,17 +120,17 @@ abstract class Doctrine_Parser
ob_start();
if ( ! file_exists($path)) {
$contents = $path;
$path = '/tmp/dparser_' . microtime();
$path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'dparser_' . microtime();
file_put_contents($path, $contents);
}
include($path);
$contents = ob_get_clean();
return $contents;
}
public function doDump($data, $path)
{
if ($path) {
@ -139,4 +139,4 @@ abstract class Doctrine_Parser
return $data;
}
}
}
}

View File

@ -248,7 +248,7 @@ UserProfile:
sorting: ASC
length: 10
primary: true
last_name: ~
last_name: []
type: unique
</code>
@ -273,4 +273,4 @@ $options = array('packagesPrefix' => 'Package', // What to p
// This code will generate the models for schema.yml at /path/to/generate/models
Doctrine::generateModelsFromYaml('schema.yml', '/path/to/generate/models', $options);
</code>
</code>