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 *