protected function getWordExpression(SelectQuery $query, $token)
    {
        if ($this->configuration['enableWildcards'] &&
             $token[0] === '*') {
            return $query->expr->like(
                $this->dbHandler->quoteColumn('word'),
                $query->bindValue('%' . substr($token, 1))
            );
        }

        if ($this->configuration['enableWildcards'] &&
             $token[strlen($token) - 1] === '*') {
            return $query->expr->like(
                $this->dbHandler->quoteColumn('word'),
                $query->bindValue(substr($token, 0, -1) . '%')
            );
        }

        return $query->expr->eq(
            $this->dbHandler->quoteColumn('word'),
            $query->bindValue($token)
        );
    }
protected function getWordExpression(SelectQuery $query, $token)
    {
        if ($this->configuration['enableWildcards'] &&
             $token[0] === '*') {
            return $query->expr->like(
                $this->dbHandler->quoteColumn('word'),
                $query->bindValue('%' . substr($token, 1))
            );
        }

        if ($this->configuration['enableWildcards'] &&
             $token[strlen($token) - 1] === '*') {
            return $query->expr->like(
                $this->dbHandler->quoteColumn('word'),
                $query->bindValue(substr($token, 0, -1) . '%')
            );
        }

        return $query->expr->eq(
            $this->dbHandler->quoteColumn('word'),
            $query->bindValue($token)
        );
    }
protected function getWordExpression ( SelectQuery $ query , $ token ) { if ( $ this -> configuration [ 'enableWildcards' ] && $ token [ 0 ] === '*' ) { return $ query -> expr -> like ( $ this -> dbHandler -> quoteColumn ( 'word' ) , $ query -> bindValue ( '%' . substr ( $ token , 1 ) ) ) ; } if ( $ this -> configuration [ 'enableWildcards' ] && $ token [ strlen ( $ token ) - 1 ] === '*' ) { return $ query -> expr -> like ( $ this -> dbHandler -> quoteColumn ( 'word' ) , $ query -> bindValue ( substr ( $ token , 0 , - 1 ) . '%' ) ) ; } return $ query -> expr -> eq ( $ this -> dbHandler -> quoteColumn ( 'word' ) , $ query -> bindValue ( $ token ) ) ; }
Get single word query expression.

Depending on the configuration of the full text search criterion
converter wildcards are either transformed into the respective LIKE
queries, or everything is just compared using equal.

@param \eZ\Publish\Core\Persistence\Database\SelectQuery $query
@param string $token

@return \eZ\Publish\Core\Persistence\Database\Expression
Get single word query expression .