本文整理匯總了PHP中okapi\Okapi::cache_sizeid_to_size2方法的典型用法代碼示例。如果您正苦於以下問題:PHP Okapi::cache_sizeid_to_size2方法的具體用法?PHP Okapi::cache_sizeid_to_size2怎麽用?PHP Okapi::cache_sizeid_to_size2使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類okapi\Okapi
的用法示例。
在下文中一共展示了Okapi::cache_sizeid_to_size2方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: call
//.........這裏部分代碼省略.........
break;
case 'is_not_found':
/* handled separately */
break;
case 'is_watched':
/* handled separately */
break;
case 'is_ignored':
/* handled separately */
break;
case 'founds':
$entry['founds'] = $row['founds'] + 0;
break;
case 'notfounds':
if ($row['type'] != 6) {
# non-event
$entry['notfounds'] = $row['notfounds'] + 0;
} else {
# event
$entry['notfounds'] = 0;
}
break;
case 'willattends':
if ($row['type'] == 6) {
# event
$entry['willattends'] = $row['willattends'] + 0;
} else {
# non-event
$entry['willattends'] = 0;
}
break;
case 'size':
# Deprecated. Leave it for backward-compatibility. See issue 155.
switch (Okapi::cache_sizeid_to_size2($row['size'])) {
case 'none':
$entry['size'] = null;
break;
case 'nano':
$entry['size'] = 1.0;
break;
# same as micro
# same as micro
case 'micro':
$entry['size'] = 1.0;
break;
case 'small':
$entry['size'] = 2.0;
break;
case 'regular':
$entry['size'] = 3.0;
break;
case 'large':
$entry['size'] = 4.0;
break;
case 'xlarge':
$entry['size'] = 5.0;
break;
case 'other':
$entry['size'] = null;
break;
# same as none
# same as none
default:
throw new Exception();
}
break;