优化catchConsole代码

This commit is contained in:
JaguarJack
2020-07-19 10:06:08 +08:00
parent 2757873ef2
commit 027ba1acdb
4 changed files with 103 additions and 11 deletions

View File

@@ -0,0 +1,31 @@
<?php
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
// +----------------------------------------------------------------------
// | Author: JaguarJack [ njphper@gmail.com ]
// +----------------------------------------------------------------------
namespace catcher\library;
use catcher\facade\FileSystem;
class Composer
{
public function psr4Autoload()
{
return $this->composerContent()['autoload']['psr-4'];
}
protected function composerContent()
{
return \json_decode(FileSystem::get($this->composerJsonPath()), true);
}
protected function composerJsonPath()
{
return root_path() . 'composer.json';
}
}