/**
* Create and configure the data mapper using sqlmap configuration file.
* Or if cache is enabled and manager already cached load from cache.
* If cache is enabled, the data mapper instance is cached.
*
* @return TSqlMapManager SqlMap manager instance
* @since 3.1.7
*/
public function getSqlMapManager()
{
if (($manager = $this->loadCachedSqlMapManager()) === null) {
$manager = new TSqlMapManager($this->getDbConnection());
if (strlen($file = $this->getConfigFile()) > 0) {
$manager->configureXml($file);
$this->cacheSqlMapManager($manager);
}
} elseif ($this->getConnectionID() !== '') {
$manager->setDbConnection($this->getDbConnection());
}
return $manager;
}