本文整理汇总了PHP中printNoResultForList函数的典型用法代码示例。如果您正苦于以下问题:PHP printNoResultForList函数的具体用法?PHP printNoResultForList怎么用?PHP printNoResultForList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了printNoResultForList函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public function render()
{
$accountId = ACCOUNT_ID;
$optParams['maxResults'] = AD_MAX_PAGE_SIZE;
$listClass = 'saved ad styles';
printListHeader($listClass);
$pageToken = null;
do {
$optParams['pageToken'] = $pageToken;
// Retrieve saved ad style list, and display it.
$result = $this->adSenseService->accounts_savedadstyles->listAccountsSavedadstyles($accountId, $optParams);
$savedAdStyles = $result['items'];
if (empty($savedAdStyles)) {
foreach ($savedAdStyles as $savedAdStyle) {
$content = array();
$mainFormat = 'Saved ad style with name "%s" and ID "%s" was found.';
$content[] = sprintf($mainFormat, $savedAdStyle['name'], $savedAdStyle['id']);
printListElementForClients($content);
}
$pageToken = isset($result['nextPageToken']) ? $result['nextPageToken'] : null;
} else {
printNoResultForList();
}
} while ($pageToken);
printListFooter();
}
示例2: 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 custom channels list, and display it.
$result = $this->adSenseHostService->customchannels->listCustomchannels($adClientId, $optParams);
$customChannels = $result['items'];
if (isset($customChannels)) {
foreach ($customChannels as $customChannel) {
$content = array();
$mainFormat = 'Custom channel with ID "%s", code "%s" and name "%s" found.';
$content[] = sprintf($mainFormat, $customChannel['id'], $customChannel['code'], $customChannel['name']);
printListElementForClients($content);
}
$pageToken = isset($result['nextPageToken']) ? $result['nextPageToken'] : null;
} else {
printNoResultForList();
}
} while ($pageToken);
printListFooter();
}
示例3: render
public function render()
{
$accountId = ACCOUNT_ID;
$optParams['maxResults'] = AD_MAX_PAGE_SIZE;
$listClass = 'clients';
printListHeader($listClass);
$pageToken = null;
do {
$optParams['pageToken'] = $pageToken;
// Retrieve ad client list, and display it.
$result = $this->adSenseService->accounts_adclients->listAccountsAdclients($accountId, $optParams);
$adClients = $result['items'];
if (isset($adClients)) {
foreach ($adClients as $adClient) {
$content = array();
$mainFormat = 'Ad client for product "%s" with ID "%s" was found.';
$firstNestedFormat = 'Supports reporting: %s';
$content[] = sprintf($mainFormat, $adClient['productCode'], $adClient['id']);
$reporting = $adClient['supportsReporting'] ? 'Yes' : 'No';
$content[] = sprintf($firstNestedFormat, $reporting);
printListElementForClients($content);
}
$pageToken = isset($result['nextPageToken']) ? $result['nextPageToken'] : null;
} else {
printNoResultForList();
}
} while ($pageToken);
printListFooter();
}
示例4: 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();
}
示例5: 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();
}
示例6: render
public function render()
{
$optParams['maxResults'] = AD_MAX_PAGE_SIZE;
$listClass = 'saved reports';
printListHeader($listClass);
$pageToken = null;
do {
$optParams['pageToken'] = $pageToken;
// Retrieve saved report list, and display it.
$result = $this->adExchangeSellerService->reports_saved->listReportsSaved($optParams);
$savedReports = $result['items'];
if (empty($savedReports)) {
foreach ($savedReports as $savedReport) {
$content = array();
$mainFormat = 'Saved report with name "%s" and ID "%s" was found.';
$content[] = sprintf($mainFormat, $savedReport['name'], $savedReport['id']);
printListElementForClients($content);
}
$pageToken = isset($result['nextPageToken']) ? $result['nextPageToken'] : null;
} else {
printNoResultForList();
}
} while ($pageToken);
printListFooter();
}
示例7: 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();
}
示例8: 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();
}
示例9: 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();
}
示例10: render
public function render()
{
$accountId = ACCOUNT_ID;
$adClientId = AD_CLIENT_ID;
$adUnitId = AD_UNIT_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->adSenseService->accounts_adunits_customchannels->listAccountsAdunitsCustomchannels($accountId, $adClientId, $adUnitId);
$customChannels = $result['items'];
if (isset($customChannels)) {
foreach ($customChannels as $customChannel) {
$content = array();
$mainFormat = 'Custom channel with code "%s" and name "%s" was found.';
$content[] = sprintf($mainFormat, $customChannel['productCode'], $customChannel['name']);
if ($customChannel['targetingInfo']) {
$targetingInfo = $customChannel['targetingInfo'];
if ($targetingInfo['adsAppearOn']) {
$content[] = sprintf('Ads appear on: %s', $targetingInfo['adsAppearOn']);
}
if ($targetingInfo['location']) {
$content[] = sprintf('Location: %s', $targetingInfo['location']);
}
if ($targetingInfo['description']) {
$content[] = sprintf('Description: %s', $targetingInfo['description']);
}
if ($targetingInfo['siteLanguage']) {
$content[] = sprintf('Site language: %s', $targetingInfo['siteLanguage']);
}
}
printListElementForClients($content);
}
$pageToken = isset($result['nextPageToken']) ? $result['nextPageToken'] : null;
} else {
printNoResultForList();
}
} while ($pageToken);
printListFooter();
}
示例11: 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();
}
示例12: 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();
}
示例13: 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();
}