summaryrefslogtreecommitdiff
path: root/framework/DataAccess/SQLMap/Statements/TSimpleDynamicSql.php
diff options
context:
space:
mode:
authorwei <>2006-12-16 03:56:03 +0000
committerwei <>2006-12-16 03:56:03 +0000
commitddc0de38f64e5834ce04f0407a8416172b596655 (patch)
treea94c75b6e7a4f443f748124b84e30d02826bb23a /framework/DataAccess/SQLMap/Statements/TSimpleDynamicSql.php
parentc8689010d28a0fe2a734131a2964d7df394cdf6c (diff)
removed adodb and framework/DataAccess
Diffstat (limited to 'framework/DataAccess/SQLMap/Statements/TSimpleDynamicSql.php')
-rw-r--r--framework/DataAccess/SQLMap/Statements/TSimpleDynamicSql.php32
1 files changed, 0 insertions, 32 deletions
diff --git a/framework/DataAccess/SQLMap/Statements/TSimpleDynamicSql.php b/framework/DataAccess/SQLMap/Statements/TSimpleDynamicSql.php
deleted file mode 100644
index 1230b4f7..00000000
--- a/framework/DataAccess/SQLMap/Statements/TSimpleDynamicSql.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
-class TSimpleDynamicSql extends TStaticSql
-{
- private $_mappings=array();
-
- public function __construct($mappings)
- {
- $this->_mappings = $mappings;
- }
-
- public function getPreparedStatement($parameter=null)
- {
- $statement = parent::getPreparedStatement($parameter);
- if($parameter !== null)
- $this->mapDynamicParameter($statement, $parameter);
- return $statement;
- }
-
- protected function mapDynamicParameter($statement, $parameter)
- {
- $sql = $statement->getPreparedSql();
- foreach($this->_mappings as $property)
- {
- $value = TPropertyAccess::get($parameter, $property);
- $sql = preg_replace('/'.TSimpleDynamicParser::DYNAMIC_TOKEN.'/', $value, $sql, 1);
- }
- $statement->setPreparedSql($sql);
- }
-}
-
-?> \ No newline at end of file