本文整理汇总了PHP中printListElement函数的典型用法代码示例。如果您正苦于以下问题:PHP printListElement函数的具体用法?PHP printListElement怎么用?PHP printListElement使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了printListElement函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public function render()
{
$adClientId = HOST_AD_CLIENT_ID;
$optParams['maxResults'] = MAX_PAGE_SIZE;
$listClass = 'list';
printListHeader($listClass);
$pageToken = null;
do {
$optParams['pageToken'] = $pageToken;
// Retrieve URL channels list and display it.
$result = $this->adSenseHostService->urlchannels->listUrlchannels($adClientId, $optParams);
$urlChannels = $result['items'];
if (isset($urlChannels)) {
foreach ($urlChannels as $urlChannel) {
$format = 'URL channel with ID "%s" and URL pattern "%s" was found.';
$content = sprintf($format, $urlChannel['id'], $urlChannel['urlPattern']);
printListElement($content);
}
$pageToken = isset($result['nextPageToken']) ? $result['nextPageToken'] : null;
} else {
printNoResultForList();
}
} while ($pageToken);
printListFooter();
}
示例2: render
public function render()
{
$adClientId = AD_CLIENT_ID;
$optParams['maxResults'] = AD_MAX_PAGE_SIZE;
$listClass = 'list';
printListHeader($listClass);
$pageToken = null;
do {
$optParams['pageToken'] = $pageToken;
// Retrieve ad unit list, and display it.
$result = $this->adSenseService->adunits->listAdunits($adClientId, $optParams);
if (isset($result['items'])) {
$adUnits = $result['items'];
foreach ($adUnits as $adUnit) {
$format = 'Ad unit with code "%s", name "%s" and status "%s" was found.';
$content = sprintf($format, $adUnit['code'], $adUnit['name'], $adUnit['status']);
printListElement($content);
}
$pageToken = isset($result['nextPageToken']) ? $result['nextPageToken'] : null;
} else {
printNoResultForList();
}
} while ($pageToken);
printListFooter();
}
示例3: render
public function render()
{
$adClientId = AD_CLIENT_ID;
$optParams['maxResults'] = AD_MAX_PAGE_SIZE;
$listClass = 'list';
printListHeader($listClass);
$pageToken = null;
//do {
$optParams['pageToken'] = $pageToken;
# Retrieve custom channels list, and display it.
$result = $this->adSenseHostService->customchannels->listCustomchannels($adClientId, $optParams);
$customChannels = $result['items'];
if (isset($customChannels)) {
foreach ($customChannels as $customChannel) {
$format = 'Custom channel with code "%s" and name "%s" was found.';
$content = sprintf($format, $customChannel['code'], $customChannel['name']);
printListElement($content);
}
$pageToken = isset($result['nextPageToken']) ? $result['nextPageToken'] : null;
} else {
printNoResultForList();
}
//} while ($pageToken);
printListFooter();
}
示例4: render
public function render()
{
$listClass = 'list';
printListHeader($listClass);
// Retrieve alert list, and display it.
$result = $this->adSenseService->alerts->listAlerts();
if (isset($result['items'])) {
$alerts = $result['items'];
foreach ($alerts as $alert) {
$format = 'Alert id "%s" with severity "%s" and type "%s" was found.';
$content = sprintf($format, $alert['id'], $alert['severity'], $alert['type']);
printListElement($content);
}
} else {
printNoResultForList();
}
printListFooter();
}
示例5: render
public function render()
{
$listClass = 'list';
printListHeader($listClass);
// Retrieve metric list, and display it.
$result = $this->adExchangeSellerService->metadata_metrics->listMetadataMetrics();
if (isset($result['items'])) {
$metrics = $result['items'];
foreach ($metrics as $metric) {
$format = 'Metric id "%s" for product(s): [%s] was found.';
$content = sprintf($format, $metric['id'], implode(', ', $metric['supportedProducts']));
printListElement($content);
}
} else {
printNoResultForList();
}
printListFooter();
}
示例6: render
public function render()
{
$listClass = 'list';
printListHeader($listClass);
// Retrieve dimension list, and display it.
$result = $this->adSenseService->metadata_dimensions->listMetadataDimensions();
if (isset($result['items'])) {
$dimensions = $result['items'];
foreach ($dimensions as $dimension) {
$format = 'Dimension id "%s" for product(s): [%s] was found.';
$content = sprintf($format, $dimension['id'], implode(', ', $dimension['supportedProducts']));
printListElement($content);
}
} else {
printNoResultForList();
}
printListFooter();
}
示例7: render
public function render()
{
$adClientId = PUBLISHER_AD_CLIENT_ID;
$listClass = 'list';
printListHeader($listClass);
$pageToken = null;
do {
// Retrieve account list, and display it.
$result = $this->adSenseHostService->accounts->listAccounts(array($adClientId));
$accounts = $result['items'];
if (isset($accounts)) {
foreach ($accounts as $account) {
$frmt = 'Account with ID "%s", name "%s" and status "%s" was found.';
$content = sprintf($frmt, $account['id'], $account['name'], $account['status']);
printListElement($content);
}
$pageToken = isset($result['nextPageToken']) ? $result['nextPageToken'] : null;
} else {
printNoResultForList();
}
} while ($pageToken);
printListFooter();
}
示例8: render
public function render()
{
$optParams['maxResults'] = AD_MAX_PAGE_SIZE;
$listClass = 'list';
printListHeader($listClass);
$pageToken = null;
do {
$optParams['pageToken'] = $pageToken;
// Retrieve account list, and display it.
$result = $this->adSenseService->accounts->listAccounts($optParams);
$accounts = $result['items'];
if (isset($accounts)) {
foreach ($accounts as $account) {
$format = 'Account with ID "%s" and name "%s" was found.';
$content = sprintf($format, $account['id'], $account['name']);
printListElement($content);
}
$pageToken = isset($result['nextPageToken']) ? $result['nextPageToken'] : null;
} else {
printNoResultForList();
}
} while ($pageToken);
printListFooter();
}
示例9: render
public function render()
{
$listClass = 'list';
printListHeader($listClass);
// Retrieve preferred deal list, and display it.
$result = $this->adExchangeSellerService->preferreddeals->listPreferreddeals();
if (isset($result['items'])) {
$deals = $result['items'];
foreach ($deals as $deal) {
$content = sprintf('Deal id "%s" ', $deal['id']);
if (isset($deal['advertiserName'])) {
$content .= sprintf('for advertiser "%s" ', $deal['advertiserName']);
}
if (isset($deal['buyerNetworkName'])) {
$content .= sprintf('on network "%s" ', $deal['buyerNetworkName']);
}
$content .= 'was found.';
printListElement($content);
}
} else {
printNoResultForList();
}
printListFooter();
}