本文整理汇总了PHP中Agent::asVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP Agent::asVersion方法的具体用法?PHP Agent::asVersion怎么用?PHP Agent::asVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agent
的用法示例。
在下文中一共展示了Agent::asVersion方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: asVersion
public function asVersion($version)
{
$result = parent::asVersion($version);
if (count($this->member) > 0) {
$result['member'] = array();
foreach ($this->member as $v) {
array_push($result['member'], $v->asVersion($version));
}
}
return $result;
}
示例2: retrievePerson
public function retrievePerson($agent)
{
// TODO: Group?
if (!$agent instanceof Agent) {
$agent = new Agent($agent);
}
$response = $this->sendRequest('GET', 'agents', array('params' => array('agent' => json_encode($agent->asVersion($this->version)))));
if ($response->success) {
$response->content = new Person(json_decode($response->content, true));
}
return $response;
}
示例3: deleteAgentProfile
public function deleteAgentProfile($agent, $id)
{
// TODO: Group
if (!$agent instanceof Agent) {
$agent = new Agent($agent);
}
$response = $this->sendRequest('DELETE', 'agents/profile', array('params' => array('agent' => json_encode($agent->asVersion($this->version)), 'profileId' => $id)));
return $response;
}