Removed Facade.
This commit is contained in:
parent
779003edcc
commit
16933ef9be
@ -127,20 +127,9 @@ class Doctrine_Export extends Doctrine_Connection_Module
|
||||
public function dropConstraint($table, $name, $primary = false)
|
||||
{
|
||||
$table = $this->conn->quoteIdentifier($table);
|
||||
$name = $this->conn->quoteIdentifier($name);
|
||||
$name = $this->conn->quoteIdentifier($this->conn->formatter->getIndexName($name));
|
||||
return $this->conn->exec('ALTER TABLE ' . $table . ' DROP CONSTRAINT ' . $name);
|
||||
}
|
||||
/**
|
||||
* drop existing foreign key
|
||||
*
|
||||
* @param string $table name of table that should be used in method
|
||||
* @param string $name name of the foreign key to be dropped
|
||||
* @return void
|
||||
*/
|
||||
public function dropForeignKey($table, $name)
|
||||
{
|
||||
return $this->dropConstraint($table, $name);
|
||||
}
|
||||
/**
|
||||
* dropSequenceSql
|
||||
* drop existing sequence
|
||||
@ -1000,9 +989,9 @@ class Doctrine_Export extends Doctrine_Connection_Module
|
||||
public function exportSchema($directory = null)
|
||||
{
|
||||
if ($directory !== null) {
|
||||
$models = Doctrine_Facade::loadModels($directory);
|
||||
$models = Doctrine::loadModels($directory);
|
||||
} else {
|
||||
$models = Doctrine_Facade::getLoadedModels();
|
||||
$models = Doctrine::getLoadedModels();
|
||||
}
|
||||
|
||||
$this->exportClasses($models);
|
||||
@ -1080,7 +1069,7 @@ class Doctrine_Export extends Doctrine_Connection_Module
|
||||
*/
|
||||
public function exportClassesSql(array $classes)
|
||||
{
|
||||
$models = Doctrine_Facade::getLoadedModels($classes);
|
||||
$models = Doctrine::getLoadedModels($classes);
|
||||
|
||||
$sql = array();
|
||||
|
||||
@ -1159,9 +1148,9 @@ class Doctrine_Export extends Doctrine_Connection_Module
|
||||
public function exportSql($directory = null)
|
||||
{
|
||||
if ($directory !== null) {
|
||||
$models = Doctrine_Facade::loadModels($directory);
|
||||
$models = Doctrine::loadModels($directory);
|
||||
} else {
|
||||
$models = Doctrine_Facade::getLoadedModels();
|
||||
$models = Doctrine::getLoadedModels();
|
||||
}
|
||||
|
||||
return $this->exportClassesSql($models);
|
||||
|
@ -38,6 +38,6 @@ class Doctrine_Task_GenerateYamlFromDb extends Doctrine_Task
|
||||
|
||||
public function execute()
|
||||
{
|
||||
Doctrine_Facade::generateYamlFromDb($this->getArgument('yaml_schema_path'));
|
||||
Doctrine::generateYamlFromDb($this->getArgument('yaml_schema_path'));
|
||||
}
|
||||
}
|
@ -39,6 +39,6 @@ class Doctrine_Task_GenerateYamlFromModels extends Doctrine_Task
|
||||
|
||||
public function execute()
|
||||
{
|
||||
Doctrine_Facade::generateYamlFromModels($this->getArgument('yaml_schema_path'), $this->getArgument('models_path'));
|
||||
Doctrine::generateYamlFromModels($this->getArgument('yaml_schema_path'), $this->getArgument('models_path'));
|
||||
}
|
||||
}
|
@ -39,7 +39,7 @@ class Doctrine_Task_LoadData extends Doctrine_Task
|
||||
|
||||
public function execute()
|
||||
{
|
||||
Doctrine_Facade::loadModels($this->getArgument('models_path'));
|
||||
Doctrine_Facade::loadData($this->getArgument('data_fixtures_path'));
|
||||
Doctrine::loadModels($this->getArgument('models_path'));
|
||||
Doctrine::loadData($this->getArgument('data_fixtures_path'));
|
||||
}
|
||||
}
|
@ -39,7 +39,7 @@ class Doctrine_Task_LoadDummyData extends Doctrine_Task
|
||||
|
||||
public function execute()
|
||||
{
|
||||
Doctrine_Facade::loadModels($this->getArgument('models_path'));
|
||||
Doctrine_Facade::loadDummyData($this->getArgument('append') ? true:false, $this->getArgument('num') ? $this->getArgument('num'):5);
|
||||
Doctrine::loadModels($this->getArgument('models_path'));
|
||||
Doctrine::loadDummyData($this->getArgument('append') ? true:false, $this->getArgument('num') ? $this->getArgument('num'):5);
|
||||
}
|
||||
}
|
@ -38,6 +38,6 @@ class Doctrine_Task_Migrate extends Doctrine_Task
|
||||
|
||||
public function execute()
|
||||
{
|
||||
Doctrine_Facade::migrate($this->getArgument('version'));
|
||||
Doctrine::migrate($this->getArgument('version'));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user