本文整理汇总了PHP中UTIL_File::convertBytesToHumanReadable方法的典型用法代码示例。如果您正苦于以下问题:PHP UTIL_File::convertBytesToHumanReadable方法的具体用法?PHP UTIL_File::convertBytesToHumanReadable怎么用?PHP UTIL_File::convertBytesToHumanReadable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UTIL_File
的用法示例。
在下文中一共展示了UTIL_File::convertBytesToHumanReadable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onAppendMarkup
/**
* The method collects all the developer info during the page handling.
*
* @param BASE_CLASS_EventCollector $event
*/
public function onAppendMarkup(BASE_CLASS_EventCollector $event)
{
$viewRenderer = OW_ViewRenderer::getInstance();
$viewRenderer->assignVar("oxwall", BOL_StorageService::getInstance()->getPlatformXmlInfo());
$view = new OW_View();
$view->setTemplate(OW::getPluginManager()->getPlugin("base")->getCmpViewDir() . "dev_tools_tpl.html");
// get current request attributes
$requestHandlerData = OW::getRequestHandler()->getDispatchAttributes();
try {
$ctrlPath = OW::getAutoloader()->getClassPath($requestHandlerData["controller"]);
} catch (Exception $e) {
$ctrlPath = "not_found";
}
$requestHandlerData["ctrlPath"] = $ctrlPath;
$requestHandlerData["paramsExp"] = var_export(empty($requestHandlerData["params"]) ? array() : $requestHandlerData["params"], true);
$view->assign("requestHandler", $requestHandlerData);
// get current request memory usage
$memoryUsage = "No info";
if (function_exists("memory_get_peak_usage")) {
$memoryUsage = UTIL_File::convertBytesToHumanReadable(memory_get_peak_usage(true));
}
$view->assign("memoryUsage", $memoryUsage);
// get default profiler data
$view->assign("profiler", UTIL_Profiler::getInstance()->getResult());
// rendered view data
$view->assign("renderedItems", $this->getViewInfo(OW_View::getDevInfo()));
// sql queries data
$filter = !empty($_GET["pr_query_log_filter"]) ? trim($_GET["pr_query_log_filter"]) : null;
$view->assign("database", $this->getSqlInfo(OW::getDbo()->getQueryLog(), OW::getDbo()->getTotalQueryExecTime(), $filter));
// events data
$view->assign("events", $this->getEventInfo(OW::getEventManager()->getLog()));
$event->add($view->render());
}