summaryrefslogtreecommitdiff
path: root/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php')
-rw-r--r--framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php b/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php
index f2d13966..ba8c3d0c 100644
--- a/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php
+++ b/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php
@@ -4,14 +4,14 @@
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2008 PradoSoft
+ * @copyright Copyright &copy; 2005-2008 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Data.SqlMap.Configuration
*/
Prado::using('System.Data.SqlMap.Configuration.TSqlMapStatement');
-
+
/**
* TSqlMapXmlConfig class file.
*
@@ -255,7 +255,7 @@ class TSqlMapXmlConfiguration extends TSqlMapXmlConfigBuilder
$resultMap, $this->_configFile, $entry->getID());
}
}
- if(!is_null($entry->getDiscriminator()))
+ if($entry->getDiscriminator()!==null)
$entry->getDiscriminator()->initialize($this->_manager);
}
}
@@ -309,16 +309,16 @@ class TSqlMapXmlMappingConfiguration extends TSqlMapXmlConfigBuilder
private $_FlushOnExecuteStatements=array();
- /**
- * Regular expressions for escaping simple/inline parameter symbols
- */
- const SIMPLE_MARK='$';
- const INLINE_SYMBOL='#';
- const ESCAPED_SIMPLE_MARK_REGEXP='/\$\$/';
- const ESCAPED_INLINE_SYMBOL_REGEXP='/\#\#/';
- const SIMPLE_PLACEHOLDER='`!!`';
- const INLINE_PLACEHOLDER='`!!!`';
-
+ /**
+ * Regular expressions for escaping simple/inline parameter symbols
+ */
+ const SIMPLE_MARK='$';
+ const INLINE_SYMBOL='#';
+ const ESCAPED_SIMPLE_MARK_REGEXP='/\$\$/';
+ const ESCAPED_INLINE_SYMBOL_REGEXP='/\#\#/';
+ const SIMPLE_PLACEHOLDER='`!!`';
+ const INLINE_PLACEHOLDER='`!!!`';
+
/**
* @param TSqlMapXmlConfiguration parent xml configuration.
*/
@@ -434,7 +434,7 @@ class TSqlMapXmlMappingConfiguration extends TSqlMapXmlConfigBuilder
foreach($node->xpath('subMap') as $subMapNode)
{
- if(is_null($discriminator))
+ if($discriminator===null)
throw new TSqlMapConfigurationException(
'sqlmap_undefined_discriminator', $node, $this->_configFile,$subMapNode);
$subMap = new TSubMap;
@@ -442,7 +442,7 @@ class TSqlMapXmlMappingConfiguration extends TSqlMapXmlConfigBuilder
$discriminator->addSubMap($subMap);
}
- if(!is_null($discriminator))
+ if($discriminator!==null)
$resultMap->setDiscriminator($discriminator);
return $resultMap;
@@ -542,7 +542,7 @@ class TSqlMapXmlMappingConfiguration extends TSqlMapXmlConfigBuilder
$scope['file'] = $this->_configFile;
$scope['node'] = $node;
- $sqlStatement=preg_replace(self::ESCAPED_INLINE_SYMBOL_REGEXP,self::INLINE_PLACEHOLDER,$sqlStatement);
+ $sqlStatement=preg_replace(self::ESCAPED_INLINE_SYMBOL_REGEXP,self::INLINE_PLACEHOLDER,$sqlStatement);
if($statement->parameterMap() === null)
{
// Build a Parametermap with the inline parameters.
@@ -559,7 +559,7 @@ class TSqlMapXmlMappingConfiguration extends TSqlMapXmlConfigBuilder
}
$sqlStatement = $sqlText['sql'];
}
- $sqlStatement=preg_replace('/'.self::INLINE_PLACEHOLDER.'/',self::INLINE_SYMBOL,$sqlStatement);
+ $sqlStatement=preg_replace('/'.self::INLINE_PLACEHOLDER.'/',self::INLINE_SYMBOL,$sqlStatement);
$this->prepareSql($statement, $sqlStatement, $node);
}
@@ -574,7 +574,7 @@ class TSqlMapXmlMappingConfiguration extends TSqlMapXmlConfigBuilder
protected function prepareSql($statement,$sqlStatement, $node)
{
$simpleDynamic = new TSimpleDynamicParser;
- $sqlStatement=preg_replace(self::ESCAPED_SIMPLE_MARK_REGEXP,self::SIMPLE_PLACEHOLDER,$sqlStatement);
+ $sqlStatement=preg_replace(self::ESCAPED_SIMPLE_MARK_REGEXP,self::SIMPLE_PLACEHOLDER,$sqlStatement);
$dynamics = $simpleDynamic->parse($sqlStatement);
if(count($dynamics['parameters']) > 0)
{
@@ -583,7 +583,7 @@ class TSqlMapXmlMappingConfiguration extends TSqlMapXmlConfigBuilder
}
else
$sql = new TStaticSql();
- $sqlStatement=preg_replace('/'.self::SIMPLE_PLACEHOLDER.'/',self::SIMPLE_MARK,$sqlStatement);
+ $sqlStatement=preg_replace('/'.self::SIMPLE_PLACEHOLDER.'/',self::SIMPLE_MARK,$sqlStatement);
$sql->buildPreparedStatement($statement, $sqlStatement);
$statement->setSqlText($sql);
}
@@ -737,4 +737,4 @@ class TSqlMapXmlMappingConfiguration extends TSqlMapXmlConfigBuilder
}
}
}
-
+