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


PHP eZCache::fetchIDList方法代码示例

本文整理汇总了PHP中eZCache::fetchIDList方法的典型用法代码示例。如果您正苦于以下问题:PHP eZCache::fetchIDList方法的具体用法?PHP eZCache::fetchIDList怎么用?PHP eZCache::fetchIDList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在eZCache的用法示例。


在下文中一共展示了eZCache::fetchIDList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

        $cli->output("The following ids are defined:");
        $column = 0;
        foreach ($cacheList as $cacheInfo) {
            $len = strlen($cacheInfo['id']);
            if ($len > $column) {
                $column = $len;
            }
        }
        $column += 2;
        foreach ($cacheList as $cacheInfo) {
            $cli->output($cli->stylize('emphasize', $cacheInfo['id']) . ':', false);
            $cli->output(str_repeat(' ', $column - strlen($cacheInfo['id']) - 1), false);
            $cli->output($cacheInfo['name']);
        }
    } else {
        $idList = eZCache::fetchIDList($cacheList);
        $cli->output("The following ids are defined: (use --verbose for more details)");
        $cli->output($cli->stylize('emphasize', implode(', ', $idList)));
    }
    $script->shutdown(0);
}
function clearItems($cacheEntries, $cli, $name)
{
    if ($name) {
        $name = $cli->stylize('emphasize', $name);
    }
    $cli->output('Clearing ' . $name . ': ', false);
    $i = 0;
    foreach ($cacheEntries as $cacheEntry) {
        if ($i > 0) {
            $cli->output(', ', false);
开发者ID:runelangseid,项目名称:ezpublish,代码行数:31,代码来源:ezcache.php

示例2: foreach

        $column = 0;
        foreach ($cacheList as $cacheInfo) {
            $len = strlen($cacheInfo['id']);
            if ($len > $column) {
                $column = $len;
            }
        }
        $column += 2;
        foreach ($cacheList as $cacheInfo) {
            $cli->output($cli->stylize('emphasize', $cacheInfo['id']) . ':', false);
            $cli->output(str_repeat(' ', $column - strlen($cacheInfo['id']) - 1), false);
            $cli->output($cacheInfo['name']);
        }
    } else {
        $cli->output("The following ids are defined: (use --verbose for more details)");
        $cli->output($cli->stylize('emphasize', implode(', ', eZCache::fetchIDList($cacheList))));
    }
    $script->shutdown(0);
}
if ($options['clear-all']) {
    $noAction = false;
    if ($purge) {
        $helper->purgeItems($cacheList, false, $purgeSleep, $purgeMax, $purgeExpiry);
    } else {
        $helper->clearItems($cacheList, false);
    }
    $script->shutdown(0);
}
if ($options['clear-tag']) {
    $noAction = false;
    $tagName = $options['clear-tag'];
开发者ID:schwabokaner,项目名称:ezpublish-legacy,代码行数:31,代码来源:ezcache.php


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