本文整理匯總了PHP中IO::info方法的典型用法代碼示例。如果您正苦於以下問題:PHP IO::info方法的具體用法?PHP IO::info怎麽用?PHP IO::info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類IO
的用法示例。
在下文中一共展示了IO::info方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: pick_count
function pick_count()
{
//clear_pick_cache(1);//緩存定期清理
//clear_search_index(1);//清除索引
clear_log(1);
//清除日誌
pload('C:cache');
$arr['search_index']['name'] = milu_lang('rules_search_index');
$arr['search_index']['msg'] = milu_lang('search_index_notice');
$arr['search_index']['show'] = '<span style=" width:120px; float:left">' . milu_lang('search_index_c') . '<hr>';
$type_arr = array('1' => milu_lang('fast_pick_rules'), '2' => milu_lang('dxc_system_rules'), '3' => milu_lang('fastpick_evo'));
$type_arr2 = array('3' => milu_lang('server_'), '4' => milu_lang('local_'));
foreach ($type_arr as $k => $v) {
foreach ($type_arr2 as $k2 => $v2) {
$type = $k . $k2;
$show_name = '<span style=" width:120px; float:left">' . $type_arr[$k] . $type_arr2[$k2] . '</span>';
$search_index_count = DB::result(DB::query("SELECT COUNT(*) FROM " . DB::table('strayer_searchindex') . " WHERE type='{$type}'"), 0);
$arr['search_index']['show'] .= $show_name . ' ' . $search_index_count . '<br />';
}
}
$log_info = IO::info(PICK_DIR . '/data/log');
$arr['log']['name'] = milu_lang('log_size');
$arr['log']['msg'] = milu_lang('auto_pick_notice');
$arr['log']['show'] = sizecount($log_info['size']);
$cache_info = IO::info(PICK_CACHE, 1, 1);
$arr['cache']['name'] = milu_lang('cache_file_size');
$arr['cache']['show'] = milu_lang('cache_size_value', array('s' => sizecount($cache_info['size']), 'p' => PICK_CACHE_SIZE));
$arr['cache']['msg'] = milu_lang('cache_notice');
return $arr;
}
示例2: checkCondition
/**
* Проверяет условия указанные в теге condition.
*
* В данной момент реализована проверка установленного пакета
*
* @param DOMNode
* @return bool
*/
private function checkCondition(DOMNode $node)
{
IO::info('Check Condition ', false);
$attr = $node->attributes;
$packageName = is_null($attr->getNamedItem('package')) ? null : $attr->getNamedItem('package')->nodeValue;
if (!is_null($packageName)) {
$version = is_null($attr->getNamedItem('version')) ? null : $attr->getNamedItem('version')->nodeValue;
$rel = is_null($attr->getNamedItem('rel')) ? null : Deps::normalizeRel($attr->getNamedItem('rel')->nodeValue);
if (is_null($version) && $rel != '!=') {
$version = '0.0';
$rel = '>=';
} elseif (is_null($rel)) {
$rel = '=';
}
io::info($packageName . ' ' . $rel . ' ' . $version . "\t", false);
$p = PackageManager::getInstalledPackage($packageName);
if ($rel == '!=') {
$res = $p === false;
} elseif ($p !== false) {
$res = version_compare($p->version, $version, $rel);
} else {
$res = false;
}
io::info('', $res ? IO::MESSAGE_OK : IO::MESSAGE_FAIL);
return $res;
}
}