本文整理汇总了PHP中str::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP str::getName方法的具体用法?PHP str::getName怎么用?PHP str::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类str
的用法示例。
在下文中一共展示了str::getName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initByDiscoveryReponse
/**
* Init device by discovery response
*
* @access public
*
* @param \stdClass $response Discovery response
*/
public function initByDiscoveryReponse(\stdClass $response)
{
$this->date = $response->DATE;
$this->location = $response->LOCATION;
$this->server = $response->SERVER;
$this->st = $response->ST;
$this->usn = $response->USN;
$this->root = new RootXMLParser($this->location);
$services = $this->root->getServices();
foreach ($services as $data) {
$service = new ServiceXMLParser($data);
$type = $service->getType();
if (isset($this->typeMapping[$service->getType()])) {
$type = $this->typeMapping[$service->getType()];
}
$this->services[$type] = $service;
}
$this->id = $this->root->getId();
$this->name = $this->root->getName();
return true;
}