/** * Returns value if it is a valid email format, FALSE otherwise. * * @param mixed $key * @return mixed */ public function testEmail($key) { if (!$this->keyExists($key)) { return false; } if (Zend_Filter::isEmail($this->_source[$key])) { return $this->_source[$key]; } return FALSE; }
/** * Returns value if it is a valid email format, FALSE otherwise. * * @param mixed $key * @return mixed */ public function isEmail($key) { return Zend_Filter::isEmail($this->_source[$key]); }
/** * Returns value if it is a valid email format, FALSE otherwise. * * @param mixed $key * @return mixed */ public function testEmail($key) { if (Zend_Filter::isEmail($this->_source[$key])) { return $this->_source[$key]; } return FALSE; }
/** * Returns value if it is a valid email format, FALSE otherwise. * * @param mixed $key * @return mixed */ public function testEmail($key = null) { if (!($value = $this->keyExists($key))) { return false; } if (Zend_Filter::isEmail($value)) { return $value; } return FALSE; }