From a2111d60af745f3c855d662db585fc175600df5f Mon Sep 17 00:00:00 2001 From: zYne Date: Mon, 23 Jul 2007 18:32:29 +0000 Subject: [PATCH] --- lib/Doctrine/Manager.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/Doctrine/Manager.php b/lib/Doctrine/Manager.php index 7674c1fdf..176937780 100644 --- a/lib/Doctrine/Manager.php +++ b/lib/Doctrine/Manager.php @@ -431,6 +431,21 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera { return $this->getConnectionForComponent($componentName)->getTable($componentName); } + /** + * table + * this is the same as Doctrine_Connection::getTable() except + * that it works seamlessly in multi-server/connection environment + * + * @see Doctrine_Connection::getTable() + * @param string $componentName + * @return Doctrine_Table + */ + public static function table($componentName) + { + return Doctrine_Manager::getInstance() + ->getConnectionForComponent($componentName) + ->getTable($componentName); + } /** * closes the connection *