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


PHP UTIL_File::convertBytesToHumanReadable方法代码示例

本文整理汇总了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());
 }
开发者ID:ZyXelP,项目名称:oxwall,代码行数:38,代码来源:developer_tools.php


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