本文整理汇总了PHP中wfHostName函数的典型用法代码示例。如果您正苦于以下问题:PHP wfHostName函数的具体用法?PHP wfHostName怎么用?PHP wfHostName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wfHostName函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setupExecuteAction
/**
* Set up for the execution.
* @return array
*/
protected function setupExecuteAction()
{
// First add the id to the top element
$result = $this->getResult();
$requestid = $this->getParameter('requestid');
if (!is_null($requestid)) {
$result->addValue(null, 'requestid', $requestid);
}
if ($this->getConfig()->get('ShowHostnames')) {
$servedby = $this->getParameter('servedby');
if ($servedby) {
$result->addValue(null, 'servedby', wfHostName());
}
}
if ($this->getParameter('curtimestamp')) {
$result->addValue(null, 'curtimestamp', wfTimestamp(TS_ISO_8601, time()), ApiResult::NO_SIZE_CHECK);
}
$params = $this->extractRequestParams();
$this->mAction = $params['action'];
if (!is_string($this->mAction)) {
$this->dieUsage('The API requires a valid action parameter', 'unknown_action');
}
return $params;
}
示例2: setupExecuteAction
/**
* Set up for the execution.
* @return array
*/
protected function setupExecuteAction()
{
// First add the id to the top element
$result = $this->getResult();
$requestid = $this->getParameter('requestid');
if (!is_null($requestid)) {
$result->addValue(null, 'requestid', $requestid);
}
$servedby = $this->getParameter('servedby');
if ($servedby) {
$result->addValue(null, 'servedby', wfHostName());
}
$params = $this->extractRequestParams();
$this->mShowVersions = $params['version'];
$this->mAction = $params['action'];
if (!is_string($this->mAction)) {
$this->dieUsage('The API requires a valid action parameter', 'unknown_action');
}
return $params;
}