public function main() { Doctrine_Manager::connection($this->dsn, self::DB_NAME); Doctrine::loadModels($this->modelPath . "/generated/"); Doctrine::setModelsDirectory($this->modelPath . "/"); if ($this->action == 'dropDB') { $this->dropDB(); } else { if ($this->action = "truncateTable" && $this->targetTable) { Doctrine_Manager::getInstance()->getCurrentConnection()->getDbh()->query("truncate table " . $this->targetTable . ";"); } } }