本文整理汇总了PHP中Api::map方法的典型用法代码示例。如果您正苦于以下问题:PHP Api::map方法的具体用法?PHP Api::map怎么用?PHP Api::map使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Api
的用法示例。
在下文中一共展示了Api::map方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRanking
/**
* @return Ranking[]
* @throws InvalidResponseException
*/
public function getRanking()
{
$response = $this->api->request('competities/' . $this->TeamId . '/' . $this->District . '/' . $this->CompId . '/' . $this->ClassId . '/' . $this->PouleId . '/ranking');
$ranking = array();
foreach ($response['List'] as $item) {
$ranking[] = $this->api->map($item, new Ranking());
}
return $ranking;
}
示例2: getCompetitions
/**
* @param string $comptype Van welke competitie type moet de stand worden terug gegeven
* @return Competition[]
* @throws InvalidResponseException
*/
public function getCompetitions($comptype = null)
{
$params = [];
if ($comptype !== null) {
$params['comptype'] = $comptype;
}
$response = $this->api->request('competities/' . $this->getId(), $params);
$competitions = array();
foreach ($response['List'] as $item) {
$competition = new Competition($this->api);
$competition->TeamId = $this->getId();
$competitions[] = $this->api->map($item, $competition);
}
return $competitions;
}
示例3: getBanner
/**
* @return Banner
*/
public function getBanner()
{
$response = $this->api->request('banners');
return $this->api->map($response['List'], new Banner());
}