本文整理匯總了PHP中sensitiveIO::IspositiveInteger方法的典型用法代碼示例。如果您正苦於以下問題:PHP sensitiveIO::IspositiveInteger方法的具體用法?PHP sensitiveIO::IspositiveInteger怎麽用?PHP sensitiveIO::IspositiveInteger使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sensitiveIO
的用法示例。
在下文中一共展示了sensitiveIO::IspositiveInteger方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
//checks and assignments
$formok = true;
if (isset($blockParamsDefinition['search'])) {
if (sizeof($blockParamsDefinition['search'])) {
foreach ($blockParamsDefinition['search'] as $searchName => $searchParams) {
foreach ($searchParams as $paramType => $paramValue) {
switch ($paramType) {
case 'keywords':
case 'category':
case 'limit':
case 'item':
if ($paramValue && !$value['search'][$searchName][$paramType]) {
//mandatory ?
$formok = false;
}
if ($paramType == 'limit' && $value['search'][$searchName][$paramType] && !sensitiveIO::IspositiveInteger($value['search'][$searchName][$paramType])) {
$cms_message .= $cms_language->getMessage(MESSAGE_FORM_ERROR_MALFORMED_FIELD, array($cms_language->getMessage(MESSAGE_PAGE_FIELD_LIMIT, false, MOD_POLYMOD_CODENAME))) . "\n";
}
break;
case 'publication date after':
case 'publication date before':
if ($paramValue && !$value['search'][$searchName][$paramType]) {
//mandatory ?
$formok = false;
} elseif ($value['search'][$searchName][$paramType]) {
//replace localised date value by db format corresponding value
$date = new CMS_date();
$date->setFormat($cms_language->getDateFormat());
if ($date->setLocalizedDate($value['search'][$searchName][$paramType])) {
$value['search'][$searchName][$paramType] = $date->getDBValue();
} else {