/** * Integer validator: is a control's value decimal number? * @param NTextBase * @return bool */ public static function validateInteger(NTextBase $control) { return NValidators::isNumericInt($control->getValue()); }
public function findClanekByUrl($url) { if (NValidators::isNumericInt($url)) { return $this->findClanekById($url); } if (preg_match('~([0-9]*)-(.*)~', htmlspecialchars_decode($url), $tmp)) { return $this->findClanekById($tmp[1]); } return FALSE; }