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:----mf5FwlxqjGpFWBZCrJjwP3JXgt6VloNELRSZhDi8UuUbxOlPWqQ3kGyhO5Aln/g3vVymrQzA9myZNA7lk6ji0/7KpyRAmX+TJN/MugtHcED9FQwVZ+MfwIa+RpZDrqDILr8djuO1wDjIPfveyll9VhvM5t3ueYTVMgU50ZYv9I3TNMNOrHs+MDsvuJnoNxGaJ0ADdMkRfytl65tvtDbCaO3V/hlhHHQ4TpE+mZzK4Ht4E9AzVdq++S6Nd9MWqr1KN9ztQcEw903gMeba8CpPm91Exh7YPwwb+S52zbibZ8GqujZHvLrLvX2MVHLW+3zkyICFsKtsTnUyEmAWRud/xA6qtbSfwffvBwEmOSBMNgmEdL+i/s7kKJ1tA3kMH5O63fTy9buKlnwcg82xXYk1lj9sVuAaL9XIlppFYsSHKC170xTwc+hqjveQ/MHEpbicHSVCIqJTMGkhu/hzSHoGyCvYoQbtL17a2eqQpeDPOYEiYNrwcauObB1oy9cVXkpI+Jq3KRSjE8u8uc00FOW87INHROj3j/YNL/GWAS2C2SH7RoHsPrsb+/H+mHCXFu9NA1A0ts4nIRJqwyU2dKnvGSNJ8fUPQIbvsG2rKcUByrQpBwDxvU+tCYtCRG1htJruETIWOXmM08hJcU4HYZJ7RM2I0gS7N+4wFakm0T2WE5o=----ATTACHMENT:----MzExNDgyMTM5MDU3MjE4MyA0NDk5NDE4NzUxMDMzNzYgNTI4MzgxMzI5MjE5NTUzNw==