• Модуль: learning
  • Путь к файлу: ~/bitrix/modules/learning/classes/general/clearnaccess.php
  • Класс: CLearnAccess
  • Вызов: CLearnAccess::StrictlyCastToInteger
static function StrictlyCastToInteger ($var)
{
	if ( ! preg_match("/^[0-9]+$/", (string) $var) )
	{
		throw new LearnException(
			'EA_PARAMS: can't b strictly casted to integer, but expected: ' . $var, 
			LearnException::EXC_ERR_ALL_PARAMS 
			| LearnException::EXC_ERR_ALL_ACCESS_DENIED);
	}

	return ( (int) $var );
}