diff --git a/lib/Doctrine/Parser.php b/lib/Doctrine/Parser.php index ab1788a77..3f7720bc6 100644 --- a/lib/Doctrine/Parser.php +++ b/lib/Doctrine/Parser.php @@ -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; } } -} \ No newline at end of file +} diff --git a/manual/docs/en/schema-files.txt b/manual/docs/en/schema-files.txt index 012e95fa3..68e1cfc26 100644 --- a/manual/docs/en/schema-files.txt +++ b/manual/docs/en/schema-files.txt @@ -248,7 +248,7 @@ UserProfile: sorting: ASC length: 10 primary: true - last_name: ~ + last_name: [] type: unique @@ -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); - \ No newline at end of file +