From 4dede8c6d115dc5a948b8c3123c9986850b293a1 Mon Sep 17 00:00:00 2001 From: zYne Date: Thu, 14 Jun 2007 20:49:11 +0000 Subject: [PATCH] added exportClasses() --- lib/Doctrine/Export.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/Export.php b/lib/Doctrine/Export.php index d6c0d9ad9..8d6940d31 100644 --- a/lib/Doctrine/Export.php +++ b/lib/Doctrine/Export.php @@ -885,11 +885,23 @@ class Doctrine_Export extends Doctrine_Connection_Module require_once $e->getPathName(); } } - } + } + return $this->exportClasses(get_declared_classes()); + } + /** + * export + * method for exporting Doctrine_Record classes to a schema + * + * @throws Doctrine_Connection_Exception if some error other than Doctrine::ERR_ALREADY_EXISTS + * occurred during the create table operation + * @param array $classes + * @return void + */ + public function exportClasses(array $classes) + { + $parent = new ReflectionClass('Doctrine_Record'); - $parent = new ReflectionClass('Doctrine_Record'); - - foreach (get_declared_classes() as $name) { + foreach ($classes as $name) { $class = new ReflectionClass($name); $conn = Doctrine_Manager::getInstance()->getConnectionForComponent($name);