public function hasEmail($string)
    {
        $result = false;
        $tokenizer = new General();
        $words = $tokenizer->tokenize($string);

        foreach ($words as $word) {
            if (filter_var($word, FILTER_VALIDATE_EMAIL)) {
                $result = true;
            }
        }

        return $result;
    }
public function hasEmail($string)
    {
        $result = false;
        $tokenizer = new General();
        $words = $tokenizer->tokenize($string);

        foreach ($words as $word) {
            if (filter_var($word, FILTER_VALIDATE_EMAIL)) {
                $result = true;
            }
        }

        return $result;
    }
public function hasEmail ( $ string ) { $ result = false ; $ tokenizer = new General ( ) ; $ words = $ tokenizer -> tokenize ( $ string ) ; foreach ( $ words as $ word ) { if ( filter_var ( $ word , FILTER_VALIDATE_EMAIL ) ) { $ result = true ; } } return $ result ; }
Check if string has email.

@param string $string

@return bool
Check if string has email .