/** * Get package name by composer package name. * * @param $composerPackageName * * @return string */ private function getPackageNameByComposerName($composerPackageName) { foreach ($this->config->all() as $key => $configItem) { if ($configItem['name'] == $composerPackageName) { return $key; } } }
/** * Get all of the configuration items for the application. * * @return array * @static */ public static function all() { return \Illuminate\Config\Repository::all(); }
/** * Saves the current configuration to WEBDEV_CONFIG_FILE, like this: "<?php return array(...);". */ public function save() { $h = fopen(WEBDEV_CONFIG_FILE, 'w'); fwrite($h, "<?php\n return " . var_export($this->config->all(), true) . ';'); fclose($h); }
/** * Get all of the configuration items for the application. * * @return array */ public function all() : array { return $this->delegate->all(); }