Exemplo n.º 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());
	}
Exemplo n.º 2
0
 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;
 }