public function hasAddress($email)
    {
        foreach ($this->addresses as $addr) {
            if (strcasecmp($addr->getEmail(), $email) === 0) {
                return true;
            }
        }
        return false;
    }
public function hasAddress($email)
    {
        foreach ($this->addresses as $addr) {
            if (strcasecmp($addr->getEmail(), $email) === 0) {
                return true;
            }
        }
        return false;
    }
public function hasAddress ( $ email ) { foreach ( $ this -> addresses as $ addr ) { if ( strcasecmp ( $ addr -> getEmail ( ) , $ email ) === 0 ) { return true ; } } return false ; }
Returns true if an address exists with the passed email address.

Comparison is done case insensitively.

@param string $email
@return boolean
Returns true if an address exists with the passed email address .