/** * _getParser * parser lazy-loader * * @throws Doctrine_Query_Exception if unknown parser name given * @return Doctrine_Query_Part * @todo Doc/Description: What is the parameter for? Which parsers are available? */ protected function _getParser($name) { if (!isset($this->_parsers[$name])) { $class = 'Doctrine_Query_' . ucwords(strtolower($name)); Doctrine_Core::autoload($class); if (!class_exists($class)) { throw new Doctrine_Query_Exception('Unknown parser ' . $name); } $this->_parsers[$name] = new $class($this, $this->_tokenizer); } return $this->_parsers[$name]; }
/** * Get the connection instance for the specified component * * @param string $componentName * @return Doctrine_Connection */ public function getConnectionForComponent($componentName) { Doctrine_Core::autoload($componentName); if (isset($this->_bound[$componentName])) { return $this->getConnection($this->_bound[$componentName]); } return $this->getCurrentConnection(); }