1
0
mirror of synced 2025-02-20 06:03:15 +03:00

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

This commit is contained in:
nicobn 2007-06-26 00:41:48 +00:00
parent 73b9f36ec7
commit 4d5745c7eb

View File

@ -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;