Commit 4d5745c7 authored by nicobn's avatar nicobn

Added two parameters so a different file name / class name can be specified.

parent 73b9f36e
......@@ -79,7 +79,7 @@ class Doctrine_Import_Builder
return $this->path;
}
public function buildRecord($table, $tableColumns)
public function buildRecord($table, $tableColumns, $className='', $fileName='')
{
if (empty($this->path)) {
throw new Doctrine_Import_Builder_Exception('No build target directory set.');
......@@ -88,8 +88,15 @@ class Doctrine_Import_Builder
throw new Doctrine_Import_Builder_Exception('Build target directory ' . $this->path . ' is not writable.');
}
$created = date('l dS \of F Y h:i:s A');
$className = Doctrine::classify($table);
$fileName = $this->path . DIRECTORY_SEPARATOR . $className . $this->suffix;
if (empty($className)) {
$className = Doctrine::classify($table);
}
if (empty($fileName)) {
$fileName = $this->path . DIRECTORY_SEPARATOR . $className . $this->suffix;
}
$columns = array();
$i = 0;
......
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