src/SearchBundle/objects/db/TShopSearchIndexer.class.php
public static function PrepareSearchWords($sOrigianlString, $bFilterIgnoreWords = true)
    {
        $aWords = array();
        $sOrigianlString = strip_tags($sOrigianlString);
        $sOrigianlString = str_replace(array('/', "\n", '-', '_', '&', '+'), array(' ', ' ', ' ', ' ', ' ', ' '), $sOrigianlString);
        $aTmpWords = explode(' ', $sOrigianlString);
        foreach ($aTmpWords as $iIndex => $sWord) {
            $sWord = trim($sWord);
            if (!empty($sWord)) {
                $sTmpWord = TdbShopSearchIndexer::PrepareSearchWord($sWord, $bFilterIgnoreWords);
                if (!empty($sTmpWord)) {
                    $aWords[] = $sTmpWord;
                }
            }
        }

        return $aWords;
    }
public static function PrepareSearchWords($sOrigianlString, $bFilterIgnoreWords = true)
    {
        $aWords = array();
        $sOrigianlString = strip_tags($sOrigianlString);
        $sOrigianlString = str_replace(array('/', "\n", '-', '_', '&', '+'), array(' ', ' ', ' ', ' ', ' ', ' '), $sOrigianlString);
        $aTmpWords = explode(' ', $sOrigianlString);
        foreach ($aTmpWords as $iIndex => $sWord) {
            $sWord = trim($sWord);
            if (!empty($sWord)) {
                $sTmpWord = TdbShopSearchIndexer::PrepareSearchWord($sWord, $bFilterIgnoreWords);
                if (!empty($sTmpWord)) {
                    $aWords[] = $sTmpWord;
                }
            }
        }

        return $aWords;
    }
public static function PrepareSearchWords ( $ sOrigianlString , $ bFilterIgnoreWords = true ) { $ aWords = array ( ) ; $ sOrigianlString = strip_tags ( $ sOrigianlString ) ; $ sOrigianlString = str_replace ( array ( '/' , "\n" , '-' , '_' , '&' , '+' ) , array ( ' ' , ' ' , ' ' , ' ' , ' ' , ' ' ) , $ sOrigianlString ) ; $ aTmpWords = explode ( ' ' , $ sOrigianlString ) ; foreach ( $ aTmpWords as $ iIndex => $ sWord ) { $ sWord = trim ( $ sWord ) ; if ( ! empty ( $ sWord ) ) { $ sTmpWord = TdbShopSearchIndexer :: PrepareSearchWord ( $ sWord , $ bFilterIgnoreWords ) ; if ( ! empty ( $ sTmpWord ) ) { $ aWords [ ] = $ sTmpWord ; } } } return $ aWords ; }
splits the search words into an array with prepared search words.

@param string $sWords
@param bool   $bFilterIgnoreWords - removes ignore words form the list if set

@return array
splits the search words into an array with prepared search words .