本文整理汇总了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;