/** * Returns value if it is a valid format for a person's name, * FALSE otherwise. * * @param mixed $key * @return mixed */ public function testName($key) { if (Zend_Filter::isName($this->_source[$key])) { return $this->_source[$key]; } return FALSE; }
/** * Returns value if it is a valid format for a person's name, * FALSE otherwise. * * @param mixed $key * @return mixed */ public function testName($key) { if (!$this->keyExists($key)) { return false; } if (Zend_Filter::isName($this->_source[$key])) { return $this->_source[$key]; } return FALSE; }
public function testisName() { $this->assertTrue(Zend_Filter::isName('Mark'), '"Mark" is a valid name'); $this->assertFalse(Zend_Filter::isName('100'), '"100" is not a valid name'); }
/** * Returns value if it is a valid format for a person's name, * FALSE otherwise. * * @param mixed $key * @return mixed */ public function isName($key) { return Zend_Filter::isName($this->_source[$key]); }
/** * Returns value if it is a valid format for a person's name, * FALSE otherwise. * * @param mixed $key * @return mixed */ public function testName($key = null) { if (!($value = $this->keyExists($key))) { return false; } if (Zend_Filter::isName($value)) { return $value; } return FALSE; }