本文整理汇总了PHP中okapi\Okapi::bearing_as_two_letters方法的典型用法代码示例。如果您正苦于以下问题:PHP Okapi::bearing_as_two_letters方法的具体用法?PHP Okapi::bearing_as_two_letters怎么用?PHP Okapi::bearing_as_two_letters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类okapi\Okapi
的用法示例。
在下文中一共展示了Okapi::bearing_as_two_letters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: call
//.........这里部分代码省略.........
case 'name':
$entry['name'] = $row['name'];
break;
case 'names':
$entry['names'] = array(Settings::get('SITELANG') => $row['name']);
break;
// for the future
// for the future
case 'location':
$entry['location'] = round($row['latitude'], 6) . "|" . round($row['longitude'], 6);
break;
case 'type':
$entry['type'] = Okapi::cache_type_id2name($row['type']);
break;
case 'status':
$entry['status'] = Okapi::cache_status_id2name($row['status']);
break;
case 'url':
$entry['url'] = Settings::get('SITE_URL') . "viewcache.php?wp=" . $row['wp_oc'];
break;
case 'owner':
$owner_ids[$row['wp_oc']] = $row['user_id'];
/* continued later */
break;
case 'distance':
$entry['distance'] = (int) Okapi::get_distance($center_lat, $center_lon, $row['latitude'], $row['longitude']);
break;
case 'bearing':
$tmp = Okapi::get_bearing($center_lat, $center_lon, $row['latitude'], $row['longitude']);
$entry['bearing'] = $tmp !== null ? (int) (10 * $tmp) / 10.0 : null;
break;
case 'bearing2':
$tmp = Okapi::get_bearing($center_lat, $center_lon, $row['latitude'], $row['longitude']);
$entry['bearing2'] = Okapi::bearing_as_two_letters($tmp);
break;
case 'bearing3':
$tmp = Okapi::get_bearing($center_lat, $center_lon, $row['latitude'], $row['longitude']);
$entry['bearing3'] = Okapi::bearing_as_three_letters($tmp);
break;
case 'is_found':
/* handled separately */
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