Configures the TSqlMapManager using xml configuration file.
부터: 3.1
상속: extends TSqlMapXmlConfigBuilder
예제 #1
0
 /**
  * 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();
 }
예제 #3
0
 /**
  * Loads and parses the SqlMap configuration file.
  * @param string xml configuration file.
  */
 public function configureXml($file)
 {
     $config = new TSqlMapXmlConfiguration($this);
     $config->configure($file);
 }