protected function prepareStringForLikeCompare($input, $type = null)
    {
        if ($type === 'array') {
            $outputString = str_replace(':{i:0;', ':{', serialize($input));
        } else {
            $outputString = $this->removeAccents($input);
        }

        return $outputString;
    }
protected function prepareStringForLikeCompare($input, $type = null)
    {
        if ($type === 'array') {
            $outputString = str_replace(':{i:0;', ':{', serialize($input));
        } else {
            $outputString = $this->removeAccents($input);
        }

        return $outputString;
    }
protected function prepareStringForLikeCompare ( $ input , $ type = null ) { if ( $ type === 'array' ) { $ outputString = str_replace ( ':{i:0;' , ':{' , serialize ( $ input ) ) ; } else { $ outputString = $ this -> removeAccents ( $ input ) ; } return $ outputString ; }
Prepares string to have almost the same behaviour as with a database,
removing accents and latin special chars.

@param mixed  $inputString
@param string $type        for array type, will serialize datas

@return string the input, serialized for arrays or without accents for strings
Prepares string to have almost the same behaviour as with a database removing accents and latin special chars .