2020-07-21 08:01:20 +08:00

37 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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'];
}
public function requires()
{
return $this->composerContent()['require'];
}
protected function composerContent()
{
return \json_decode(FileSystem::get($this->composerJsonPath()), true);
}
protected function composerJsonPath()
{
return root_path() . 'composer.json';
}
}