From ddc0de38f64e5834ce04f0407a8416172b596655 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 16 Dec 2006 03:56:03 +0000 Subject: removed adodb and framework/DataAccess --- .../Configuration/TInlineParameterMapParser.php | 50 ---------------------- 1 file changed, 50 deletions(-) delete mode 100644 framework/DataAccess/SQLMap/Configuration/TInlineParameterMapParser.php (limited to 'framework/DataAccess/SQLMap/Configuration/TInlineParameterMapParser.php') diff --git a/framework/DataAccess/SQLMap/Configuration/TInlineParameterMapParser.php b/framework/DataAccess/SQLMap/Configuration/TInlineParameterMapParser.php deleted file mode 100644 index bc633b2c..00000000 --- a/framework/DataAccess/SQLMap/Configuration/TInlineParameterMapParser.php +++ /dev/null @@ -1,50 +0,0 @@ -getParameterClass() : null; - $matches = array(); - $mappings = array(); - preg_match_all($this->PARAMETER_TOKEN_REGEXP, $sqlText, $matches); - - for($i = 0, $k=count($matches[1]); $i<$k; $i++) - { - $mappings[] = $this->parseMapping($matches[1][$i], - $parameterClass, $sqlMap, $scope); - $sqlText = str_replace($matches[0][$i], '?', $sqlText); - } - return array('sql'=>$sqlText, 'parameters'=>$mappings); - } - - /** - * Parse inline parameter with syntax as - * #propertyName,type=string,dbype=Varchar,nullValue=N/A,handler=string# - */ - protected function parseMapping($token, $parameterClass, $sqlMap, $scope) - { - $mapping = new TParameterProperty; - $properties = explode(',', $token); - $mapping->setProperty(trim(array_shift($properties))); - //var_dump($properties); - foreach($properties as $property) - { - $prop = explode('=',$property); - $name = trim($prop[0]); $value=trim($prop[1]); - if($mapping->canSetProperty($name)) - $mapping->{'set'.$name}($value); - else - throw new TSqlMapUndefinedException( - 'sqlmap_undefined_property_inline_map', - $name, $scope['statement'], $scope['file']); - } - $mapping->initialize($sqlMap); - return $mapping; - } -} - -?> \ No newline at end of file -- cgit v1.2.3