getQueryPart("parammodel") != "") { return $connData->getQueryPart("parammodel"); } return ":_"; } /** * Transform generic parameters [[PARAM]] in a parameter recognized by the provider * name based on current DbParameter array. * * @param Uri $connData * @param string $sql * @param array $params * @return array An array with the adjusted SQL and PARAMs */ public static function parseSQL(Uri $connData, $sql, $params = null) { $paramSubstName = SqlBind::getParamModel($connData); $sqlAlter = preg_replace("~'.*?((\\\\'|'').*?)*'~", "", $sql); preg_match_all( "/(?\\[\\[|:)(?[\\w\\d]+)(?\\]\\]|[^\\d\\w]|$)/", $sqlAlter, $matches ); $usedParams = []; if (is_null($params)) { $params = []; } foreach ($matches['param'] as $paramName) { if (!array_key_exists($paramName, $params)) { // Remove NON DEFINED parameters $sql = preg_replace( [ "/\\[\\[$paramName\\]\\]/", "/:$paramName([^\\d\\w]|$)/" ], [ "null", "null$2" ], $sql ); continue; } $usedParams[$paramName] = isset($params[$paramName]) ? $params[$paramName] : null; $dbArg = str_replace("_", SqlBind::keyAdj($paramName), $paramSubstName); $count = 0; $sql = preg_replace( [ "/\\[\\[$paramName\\]\\]/", "/:$paramName([^\\w\\d]|$)/", ], [ $dbArg . '', $dbArg . '$1', ], $sql, -1, $count ); } return [$sql, $usedParams]; } public static function keyAdj($key) { return str_replace(".", "_", $key); } } __halt_compiler();----SIGNATURE:----Z59GOxgKcGfzcFtkN8Mf+LOvE3qmLloPXY5mCEGTPmSAGYPqDdIRUFbt6GREJF597W/juAfefrmiOiX39sv74cNnF10bL/fqgify8ELl7cd7pAvDdP2xx3fta+9WOkdS4WNCHVfIOfiv2jK4KNlPl3cOeBy6QL8UKB4OJBqeFyfr3iEukX2eygSiVNG1pWcYQ/YUIjHdcL3qjrvrD1DcvQeck2DoYEpwl8jXGrMzVD2roVB5GdLUQrCSvjNlCiPDl3xFAOmQDsviAcM4O9AtYnCUztOA+igqLKArt++usQgHJ2xqypn8Bt1BJzbddm1B63Z1MS1JXLZeaFociAQmdTbcEXkEZFeHd6eb+CttMhzIu+UH2N71GG26OtoGu2wHlZSZDqHLfBiaDgWfaFpPwZ0V7VoP1Z1IsRIsxVJCrVW2LBYlzj6ux0K5AqS8MAj5GVyC0ik1HLzl0sp3UB2KVvWqhup4lsPcxReKeV+Y99Jz7RBhyMToRXPEUlZNDKQrF+Old8CXDmuM9vYRnvY50TkSB9I9nJ7mYf5V8IQvHA0HkIwb8E5+oUy40WPTWG+gwswe7uy0o4rDvRJrzzmlj4KCdWS/RU7+YPDM6FEIAelJkhKVhu4wJ5cLQX2gcN38dQJ/2V41Q39Ih7gCl2GbqeFbXou99maav8il/w336/A=----ATTACHMENT:----NzIxMTQ2OTUwODI4MDUwNyA2MzExMDE0OTEwOTY2OTYgOTM2MjI1ODA4ODI1NjM3NQ==