InsertQuery::filterLiterals PHP Méthode

filterLiterals() protected méthode

Removes all FluentLiteral instances from the argument since they are not to be used as PDO parameters but rather injected directly into the query
protected filterLiterals ( $statements ) : array
$statements
Résultat array
    protected function filterLiterals($statements)
    {
        $f = function ($item) {
            return !$item instanceof FluentLiteral;
        };
        return array_map(function ($item) use($f) {
            if (is_array($item)) {
                return array_filter($item, $f);
            }
            return $item;
        }, array_filter($statements, $f));
    }