1
0
mirror of synced 2025-01-29 19:41:45 +03:00

Changes extenstion to .php instead of .class.php to be consistant with all of Doctrine.

This commit is contained in:
Jonathan.Wage 2007-11-01 23:54:27 +00:00
parent 6f07c2b100
commit d099c2e357
3 changed files with 32 additions and 4 deletions

View File

@ -196,7 +196,7 @@ class Doctrine_Import extends Doctrine_Connection_Module
* @param array $databases
* @return array the names of the imported classes
*/
public function importSchema($directory, array $databases = array())
public function importSchema($directory, array $databases = array(), array $options = array())
{
$connections = Doctrine_Manager::getInstance()->getConnections();
@ -208,8 +208,8 @@ class Doctrine_Import extends Doctrine_Connection_Module
}
$builder = new Doctrine_Import_Builder();
$builder->generateBaseClasses(true);
$builder->setTargetPath($directory);
$builder->setOptions($options);
$classes = array();
foreach ($connection->import->listTables() as $table) {

View File

@ -68,7 +68,7 @@ class Doctrine_Import_Builder
*
* @var string $suffix
*/
protected $_suffix = '.class.php';
protected $_suffix = '.php';
/**
* generateBaseClasses
@ -235,6 +235,34 @@ class Doctrine_Import_Builder
return $this->_path;
}
/**
* setOptions
*
* @param string $options
* @return void
*/
public function setOptions($options)
{
if (!empty($options)) {
foreach ($options as $key => $value) {
$this->setOption($key, $value);
}
}
}
/**
* setOption
*
* @param string $key
* @param string $value
* @return void
*/
public function setOption($key, $value)
{
$name = '_'.$key;
$this->$name = $value;
}
/**
* loadTemplate
*

View File

@ -46,7 +46,7 @@ class Doctrine_Import_Schema
'generateTableClasses' => true,
'baseClassesDirectory' => 'generated',
'baseClassName' => 'Doctrine_Record',
'suffix' => '.class.php');
'suffix' => '.php');
/**
* getOption