示例#1
0
 protected function getMysqlSqlMapManager()
 {
     static $conn;
     static $sqlMapManager;
     if (Prado::getApplication() === null) {
         Prado::setApplication(new TApplication(dirname(__FILE__) . '/app'));
     }
     if ($conn === null) {
         $conn = new TDbConnection('mysql:host=localhost;dbname=prado_unitest', 'prado_unitest', 'prado_unitest');
     }
     $conn->setActive(true);
     if ($sqlMapManager === null) {
         $sqlMapManager = new TSqlMapManager($conn);
         $sqlMapManager->configureXml(dirname(__FILE__) . '/DynamicParameterTestMap.xml');
     }
     return $sqlMapManager;
 }