]> git.andy128k.dev Git - ipf-legacy-orm.git/commitdiff
add escapePattern method
authorAndrey Kutejko <andy128k@gmail.com>
Sat, 27 Jul 2013 13:52:58 +0000 (16:52 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sat, 27 Jul 2013 13:52:58 +0000 (16:52 +0300)
ipf/orm/connection.php

index 6e1fe6a0d3f95f99ee2534a5d12250a16c79ae38..5f7fc93826c28039123dd461b09d17037f3d2b48 100644 (file)
@@ -403,6 +403,16 @@ abstract class IPF_ORM_Connection extends IPF_ORM_Configurable implements Counta
         }
     }
 
+    public function escapePattern($text)
+    {
+        $q = $this->string_quoting['escape_pattern'];
+        $text = str_replace($q, $q . $q, $text);
+        foreach ($this->wildcards as $wildcard) {
+            $text = str_replace($wildcard, $q . $wildcard, $text);
+        }
+        return $text;
+    }
+
     public function setDateFormat($format = null)
     {
     }