/** * Load document using simple xml. * @param string filename. * @return SimpleXmlElement xml document. */ protected function loadXmlDocument($filename, TSqlMapXmlConfiguration $config) { if (strpos($filename, '${') !== false) { $filename = $config->replaceProperties($filename); } if (!is_file($filename)) { throw new TSqlMapConfigurationException('sqlmap_unable_to_find_config', $filename); } return simplexml_load_string($config->replaceProperties(file_get_contents($filename))); }
/** * @param TSqlMapXmlConfiguration parent xml configuration. */ public function __construct(TSqlMapXmlConfiguration $xmlConfig) { $this->_xmlConfig = $xmlConfig; $this->_manager = $xmlConfig->getManager(); }
/** * Loads and parses the SqlMap configuration file. * @param string xml configuration file. */ public function configureXml($file) { $config = new TSqlMapXmlConfiguration($this); $config->configure($file); }