Example #1
0
 /**
  * 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;
 }
Example #2
0
 /**
  * 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;
 }
Example #3
0
 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');
 }
Example #4
0
 /**
  * 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]);
 }
Example #5
0
 /**
  * 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;
 }