CraftCli\Application::getComposerConfig PHP Метод

getComposerConfig() публичный Метод

Get craft-cli configuration stored in the root composer.json
public getComposerConfig ( ) : array
Результат array
    public function getComposerConfig()
    {
        if (!$this->vendorPath) {
            return array();
        }
        $jsonPath = rtrim($this->vendorPath, '/') . '/../composer.json';
        if (!file_exists($jsonPath)) {
            return array();
        }
        $jsonContents = file_get_contents($jsonPath);
        if (!$jsonContents) {
            return array();
        }
        $package = json_decode($jsonContents, true);
        if (!isset($package['extra']['craft-cli'])) {
            return array();
        }
        return $package['extra']['craft-cli'];
    }