From: Andrey Kutejko Date: Sat, 27 Jul 2013 13:52:58 +0000 (+0300) Subject: add escapePattern method X-Git-Tag: 0.5~130 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=8a6a1fc9305e31da95f0131ac2fd1a02fcf2bd26;p=ipf.git add escapePattern method --- diff --git a/ipf/orm/connection.php b/ipf/orm/connection.php index 6e1fe6a..5f7fc93 100644 --- a/ipf/orm/connection.php +++ b/ipf/orm/connection.php @@ -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) { }