/** * Returns only the digits in value. This differs from getInt(). * * @param mixed $key * @return mixed * * @tag filter */ function getDigits($key) { if (!$this->keyExists($key)) { return false; } return Inspekt::getDigits($this->_getValue($key)); }
echo "</pre>\n"; ?> <h2>Inspekt::noTagsOrSpecial($d)</h2> <?php $newd = Inspekt::noTagsOrSpecial($d); echo "<pre>"; echo var_dump($newd); echo "</pre>\n"; ?> <h2>Inspekt::getDigits($d)</h2> <?php $newd = Inspekt::getDigits($d); echo "<pre>"; echo var_dump($newd); echo "</pre>\n"; ?> <h2>Inspekt::getROT13($d)</h2> <?php $newd = Inspekt::getROT13($d); echo "<pre>"; echo var_dump($newd); echo "</pre>\n"; ?>
/** * Generated from @assert ('1)@*(&UR)HQ)56W(*(HG))') === '156'. */ public function testGetDigits() { $this->assertSame('156', Inspekt::getDigits('1)@*(&UR)HQ)56W(*(HG))')); }
/** * Returns only the digits in value. This differs from getInt(). * * @param mixed $key * @return mixed * @throws Exception * @tag filter */ public function getDigits($key) { return Inspekt::getDigits($this->getValue($key)); }