/** * Returns only the alphabetic characters in value. * * @param mixed $key * @return mixed * * @tag filter */ function getAlpha($key) { if (!$this->keyExists($key)) { return false; } return Inspekt::getAlpha($this->_getValue($key)); }
/** * */ public function testGetAlpha() { $input = '0qhf01 *#R& !)*h09hqwe0fH! )efh0hf'; $output = 'qhfRhhqwefHefhhf'; $this->assertTrue(Inspekt::getAlpha($input) === $output); }
/** * */ public function testGetAlpha() { $input = '0qhf01 *#R& !)*h09hqwe0fH! )efh0hf'; $output = 'qhfRhhqwefHefhhf'; $this->assertTrue(Inspekt::getAlpha($input) === $output); $input = array('1241DOSLDH', 'efoihr123-', 'eoeijfo1'); $output = array('DOSLDH', 'efoihr', 'eoeijfo'); $this->assertEquals(Inspekt::getAlpha($input), $output); }
/** * Returns only the alphabetic characters in value. * * @param mixed $key * @return mixed * @throws Exception * @tag filter */ public function getAlpha($key) { return Inspekt::getAlpha($this->getValue($key)); }