Example #1
0
 /**
  * Returns value if every character is alphabetic or a digit,
  * FALSE otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function testAlnum($key)
 {
     if (!$this->keyExists($key)) {
         return false;
     }
     if (Zend_Filter::isAlnum($this->_source[$key])) {
         return $this->_source[$key];
     }
     return FALSE;
 }
Example #2
0
 /**
  * Returns value if every character is alphabetic or a digit,
  * FALSE otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function testAlnum($key)
 {
     if (Zend_Filter::isAlnum($this->_source[$key])) {
         return $this->_source[$key];
     }
     return FALSE;
 }
Example #3
0
 /**
  * Returns value if every character is alphabetic or a digit,
  * FALSE otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function isAlnum($key)
 {
     return Zend_Filter::isAlnum($this->_source[$key]);
 }
Example #4
0
 /**
  * @deprecated since 0.8.0
  * @return     void
  */
 public function testIsAlnum()
 {
     $this->assertTrue(Zend_Filter::isAlnum('abc123'), '"abc123" is alphanumeric.');
     $this->assertFalse(Zend_Filter::isAlnum('abc xyz'), '"abc 123" is not alphanumeric.');
 }
Example #5
0
 /**
  * Returns value if every character is alphabetic or a digit,
  * FALSE otherwise.
  *
  * @param mixed $key
  * @return mixed
  */
 public function testAlnum($key = null)
 {
     if (!($value = $this->keyExists($key))) {
         return false;
     }
     if (Zend_Filter::isAlnum($value)) {
         return $value;
     }
     return FALSE;
 }