Bolt\Storage\Query\SearchQuery::getSearchParameter PHP Method

getSearchParameter() protected method

This is an internal helper method to get the search words prepared to be passed to the expression builder.
protected getSearchParameter ( ) : string
return string
    protected function getSearchParameter()
    {
        if (strpos($this->search, '+')) {
            $words = preg_split('/[\\s\\+]+/', $this->search);
            return '%' . implode('% && %', $words) . '%';
        } else {
            $words = explode(' ', $this->search);
            return '%' . implode('% || %', $words) . '%';
        }
    }