本文整理汇总了PHP中api_Utils::GetFriendlySize方法的典型用法代码示例。如果您正苦于以下问题:PHP api_Utils::GetFriendlySize方法的具体用法?PHP api_Utils::GetFriendlySize怎么用?PHP api_Utils::GetFriendlySize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类api_Utils
的用法示例。
在下文中一共展示了api_Utils::GetFriendlySize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SystemLogging
public function SystemLogging(ap_Standard_Screen &$oScreen)
{
$this->oSettings->GetConf('Common/LoggingLevel');
$this->oSettings->GetConf('Common/EnableEventLogging');
$oScreen->Data->SetValue('ch_EnableDebugLogging', $this->oSettings->GetConf('Common/EnableLogging'));
$iLogLevel = $this->oSettings->GetConf('Common/LoggingLevel');
$oScreen->Data->SetValue('selVerbosityFull', ELogLevel::Full === $iLogLevel);
$oScreen->Data->SetValue('selVerbosityWarning', ELogLevel::Warning === $iLogLevel);
$oScreen->Data->SetValue('selVerbosityError', ELogLevel::Error === $iLogLevel);
$oScreen->Data->SetValue('selVerbositySpec', ELogLevel::Spec === $iLogLevel);
$oScreen->Data->SetValue('ch_EnableUserActivityLogging', $this->oSettings->GetConf('Common/EnableEventLogging'));
$aSize = $this->oModule->GetLogsSize();
$oScreen->Data->SetValue('DownloadLogSize', '(' . api_Utils::GetFriendlySize($aSize[0]) . ')');
$oScreen->Data->SetValue('DownloadUserActivityLogSize', '(' . api_Utils::GetFriendlySize($aSize[1]) . ')');
$oScreen->Data->SetValue('MaxViewSize', CApi::GetConf('log.max-view-size', 100) . 'KB');
}
示例2: MinShare
/**
* @return array
*/
public function MinShare()
{
$mData = $this->getParamValue('Result', false);
if ($mData && isset($mData['__hash__'], $mData['Name'], $mData['Size'])) {
$bUseUrlRewrite = (bool) \CApi::GetConf('labs.server-use-url-rewrite', false);
$sUrl = '?/Min/Download/';
if ($bUseUrlRewrite) {
$sUrl = '/download/';
}
$sUrlRewriteBase = (string) \CApi::GetConf('labs.server-url-rewrite-base', '');
if (!empty($sUrlRewriteBase)) {
$sUrlRewriteBase = '<base href="' . $sUrlRewriteBase . '" />';
}
return array('Template' => 'templates/FilesPub.html', '{{Url}}' => $sUrl . $mData['__hash__'], '{{FileName}}' => $mData['Name'], '{{FileSize}}' => \api_Utils::GetFriendlySize($mData['Size']), '{{FileType}}' => \api_Utils::GetFileExtension($mData['Name']), '{{BaseUrl}}' => $sUrlRewriteBase);
}
return false;
}