private static function expandSqlite(Connection $connection)
    {
        // add support for REGEXP operator
        $connection->getWrappedConnection()->sqliteCreateFunction(
            'regexp',
            function ($pattern, $data, $delimiter = '~', $modifiers = 'isuS') {
                if (isset($pattern, $data)) {
                    return (preg_match(sprintf('%1$s%2$s%1$s%3$s', $delimiter, $pattern, $modifiers), $data) > 0);
                }

                return;
            }
        );
    }
private static function expandSqlite(Connection $connection)
    {
        // add support for REGEXP operator
        $connection->getWrappedConnection()->sqliteCreateFunction(
            'regexp',
            function ($pattern, $data, $delimiter = '~', $modifiers = 'isuS') {
                if (isset($pattern, $data)) {
                    return (preg_match(sprintf('%1$s%2$s%1$s%3$s', $delimiter, $pattern, $modifiers), $data) > 0);
                }

                return;
            }
        );
    }
private static function expandSqlite ( Connection $ connection ) { // add support for REGEXP operator $ connection -> getWrappedConnection ( ) -> sqliteCreateFunction ( 'regexp' , function ( $ pattern , $ data , $ delimiter = '~' , $ modifiers = 'isuS' ) { if ( isset ( $ pattern , $ data ) ) { return ( preg_match ( sprintf ( '%1$s%2$s%1$s%3$s' , $ delimiter , $ pattern , $ modifiers ) , $ data ) > 0 ) ; } return ; } ) ; }
Custom SQLite logic.

@param Connection $connection
Custom SQLite logic .