本文整理汇总了PHP中ApiBase::getMuniNames方法的典型用法代码示例。如果您正苦于以下问题:PHP ApiBase::getMuniNames方法的具体用法?PHP ApiBase::getMuniNames怎么用?PHP ApiBase::getMuniNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApiBase
的用法示例。
在下文中一共展示了ApiBase::getMuniNames方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: output
function output($results)
{
if ($results['head']['status'] == '0') {
#Fall back to xml if errors
Format::outputXml($results);
} else {
$xml = self::initialise();
self::outputWarning($xml, $results['head']);
self::setProperties($xml);
#Output each row in the body
$muni_names = ApiBase::getMuniNames();
foreach ($results['body'] as $row) {
self::writeRow($xml, $row, $muni_names);
}
#finalise
self::finalise($xml);
#print
echo $xml->outputMemory(true);
}
}
示例2: output
function output($results)
{
if ($results['head']['status'] == '0') {
#Fall back to xml if errors
Format::outputXml($results);
} else {
@header("content-type: text/plain; charset=UTF-8");
$muni_names = ApiBase::getMuniNames();
$county_names = ApiBase::getCountyNames();
$text = "";
$text .= self::outputWarning($results['head']);
$text .= self::writeHeader();
foreach ($results['body'] as $row) {
$text .= self::writeRow($row, $muni_names, $county_names);
}
$text .= self::writeEnder();
#print
echo $text;
}
}