Merge pull request #235 from holtkamp/patch-1
Allow ExporterDrivers that implement the exportClassMetadata() function to return false
This commit is contained in:
commit
e5cf1da4ee
@ -111,16 +111,18 @@ abstract class AbstractExporter
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->_metadata as $metadata) {
|
foreach ($this->_metadata as $metadata) {
|
||||||
$output = $this->exportClassMetadata($metadata);
|
//In case output is returned, write it to a file, skip otherwise
|
||||||
$path = $this->_generateOutputPath($metadata);
|
if($output = $this->exportClassMetadata($metadata)){
|
||||||
$dir = dirname($path);
|
$path = $this->_generateOutputPath($metadata);
|
||||||
if ( ! is_dir($dir)) {
|
$dir = dirname($path);
|
||||||
mkdir($dir, 0777, true);
|
if ( ! is_dir($dir)) {
|
||||||
|
mkdir($dir, 0777, true);
|
||||||
|
}
|
||||||
|
if (file_exists($path) && !$this->_overwriteExistingFiles) {
|
||||||
|
throw ExportException::attemptOverwriteExistingFile($path);
|
||||||
|
}
|
||||||
|
file_put_contents($path, $output);
|
||||||
}
|
}
|
||||||
if (file_exists($path) && !$this->_overwriteExistingFiles) {
|
|
||||||
throw ExportException::attemptOverwriteExistingFile($path);
|
|
||||||
}
|
|
||||||
file_put_contents($path, $output);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user