getDbFunctions()->SQLDate("d/m/Y H:i", "dtcriacao") */ abstract public function sqlDate($format, $column = null); protected function prepareSqlDate($input, $pattern, $delimitString = "'") { $prepareString = preg_split('/([YyMmQqDdhHisaA])/', $input, -1, PREG_SPLIT_DELIM_CAPTURE); foreach ($prepareString as $key => $value) { if ('' === $value) { unset($prepareString[$key]); continue; } if (isset($pattern[$value])) { $formatted = $pattern[$value]; } else { $formatted = $delimitString . $value . $delimitString; } $prepareString[$key] = $formatted; } return $prepareString; } /** * Format a string date to a string database readable format. * * @param string $date * @param string $dateFormat * @return string */ public function toDate($date, $dateFormat) { $dateTime = DateTime::createFromFormat($dateFormat, $date); return $dateTime->format(self::YMDH); } /** * Format a string database readable format to a string date in a free format. * * @param string $date * @param string $dateFormat * @return string */ public function fromDate($date, $dateFormat) { $dateTime = DateTime::createFromFormat(self::YMDH, $date); return $dateTime->format($dateFormat); } /** * @param DbDriverInterface $dbdataset * @param string $sql * @param array $param * @return int */ public function executeAndGetInsertedId(DbDriverInterface $dbdataset, $sql, $param) { $dbdataset->execute($sql, $param); return $dbdataset->getDbConnection()->lastInsertId(); } /** * @param array|string $field * @return mixed */ public function delimiterField($field) { $result = []; foreach ((array)$field as $fld) { $fldAr = explode('.', $fld); $result[] = $this->deliFieldLeft . implode($this->deliFieldRight . '.' . $this->deliFieldLeft, $fldAr) . $this->deliFieldRight; } if (is_string($field)) { return $result[0]; } return $result; } public function delimiterTable($table) { $tableAr = explode('.', $table); return $this->deliTableLeft . implode($this->deliTableRight . '.' . $this->deliTableLeft, $tableAr) . $this->deliTableRight; } public function forUpdate($sql) { if (!preg_match('#\bfor update\b#i', $sql)) { $sql = $sql . " FOR UPDATE "; } return $sql; } abstract public function hasForUpdate(); } __halt_compiler();----SIGNATURE:----Ze7/4a/SXbJ4AzgLHbBq+0E4FOjXvtC0LRysi+cx/Wfdgw0dU4uBgl4JRJNPMhlCFdShQWsDJ0kRhV2AhsUcIdf4DY8WJ1e4fI9CvMAsQm1qa08PrqqVSE80y86wPYPOQ463+p3bsf2J6fkKJgVxuvuAGMdFCUE3nYpj2gF4BO8uzC9VgARgZuIXwGWh7gCgyKkAielsOGHAbQ50sXo4uNN4Tv2vVWgFn3b2AEK/+vZmdIK6v6VLEZSa+3B752B+PRNUQyngqyHD8THZe5b0kzh+0N4T0ROeP0RpOdCtB0Nd8PKAROKiUI78VKy1XHVP7Ucup2iAi3bDmwQZKb1HSiSqzjYMko3Yo/6sPlMTjGgh14A/fzhpF7QfafajJ6MYdWz+iZX9y3iM9lzSj9buDf1S+v6Lnwy5KeGDWw/B9E5mUIAMhqXM6M8sAD6rsgXw/D4jW65q2TYCwq4nlGYsmWF8RphDbbvAvChyp0XUUIXznNdCmBYFDv2EbjDJs1UaxCymT38KrVssrx/xkIjgoURnpSuGmq7eUqSs2C5CjjhpxRPYcmJ85TgfONoPbHMv//bb+ulpqgYe0aQNQPcVaIGLDDxjvGtN8kPSG0qsC1jO7z51bUQJuoYL8MEZ15wvbD94fFYw4BhIb9LrBL5bRZgWrFoFjN/SDD49FtYeQ9Q=----ATTACHMENT:----NDgzMzg0MDI3Njc1NjU0IDc2MDU2NTA2NDc2ODM3MzUgNzc3Nzg0NDY0NjQzMTMzNg==