src/Biz/System/Util/LogDataUtils.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Biz\System\Util;
use Topxia\Service\Common\ServiceKernel;
use Biz\Course\Util\CourseTitleUtils;
use AppBundle\Common\PluginVersionToolkit;
use Symfony\Component\Yaml\Yaml;
class LogDataUtils
{
public static function getYmlConfig()
{
$paths = self::getConfigPath();
$permissions = array();
foreach ($paths as $path) {
if (!file_exists($path)) {
continue;
}
$menus = Yaml::parse(file_get_contents($path));
if (empty($menus)) {
continue;
}
$permissions = array_merge($permissions, $menus);
}
return $permissions;
}
private static function getConfigPath()
{
$configPaths = array();
$rootDir = ServiceKernel::instance()->getParameter('kernel.root_dir');
$files = array(
$rootDir.'/../src/AppBundle/Resources/config/log_modules.yml',
$rootDir.'/../src/CustomBundle/Resources/config/log_modules.yml',
);
foreach ($files as $filepath) {
if (is_file($filepath)) {
$configPaths[] = $filepath;
}
}
$count = self::getAppService()->findAppCount();
$apps = self::getAppService()->findApps(0, $count);
foreach ($apps as $app) {
if ('plugin' != $app['type']) {
continue;
}
if ('MAIN' !== $app['code'] && $app['protocol'] < 3) {
continue;
}
if (!PluginVersionToolkit::dependencyVersion($app['code'], $app['version'])) {
continue;
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。