예제 #1
0
	/**
	 * Integer validator: is a control's value decimal number?
	 * @param  NTextBase
	 * @return bool
	 */
	public static function validateInteger(NTextBase $control)
	{
		return NValidators::isNumericInt($control->getValue());
	}
예제 #2
0
파일: Redakce.php 프로젝트: krecek/nrsn
 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;
 }