当前位置: 首页>>代码示例>>PHP>>正文


PHP printListElement函数代码示例

本文整理汇总了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();
 }
开发者ID:hemalcommercepundit,项目名称:google-api-php-client,代码行数:25,代码来源:GetAllUrlChannelsForHost.php

示例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();
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:25,代码来源:GetAllAdUnits.php

示例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();
 }
开发者ID:hunter2814,项目名称:reason_package,代码行数:25,代码来源:GetAllCustomChannels.php

示例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();
 }
开发者ID:ankush1990,项目名称:google-api-php-client,代码行数:18,代码来源:GetAllAlerts.php

示例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();
 }
开发者ID:ankush1990,项目名称:google-api-php-client,代码行数:18,代码来源:GetAllMetrics.php

示例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();
 }
开发者ID:ankush1990,项目名称:google-api-php-client,代码行数:18,代码来源:GetAllDimensions.php

示例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();
 }
开发者ID:ankush1990,项目名称:google-api-php-client,代码行数:23,代码来源:GetAccountDataForExistingPublisher.php

示例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();
 }
开发者ID:ricain59,项目名称:fortaff,代码行数:24,代码来源:GetAllAccounts.php

示例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();
 }
开发者ID:ankush1990,项目名称:google-api-php-client,代码行数:24,代码来源:GetAllPreferredDeals.php


注:本文中的printListElement函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。