
| Current Path : /var/www/html/vendor/drush/drush/src/Config/Loader/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/vendor/drush/drush/src/Config/Loader/YamlConfigLoader.php |
<?php
namespace Drush\Config\Loader;
use Symfony\Component\Yaml\Yaml;
use Consolidation\Config\Loader\ConfigLoader;
/**
* Load configuration files, and fill in any property values that
* need to be expanded.
*/
class YamlConfigLoader extends ConfigLoader
{
public function load($path): self
{
$this->setSourceName($path);
// We silently skip any nonexistent config files, so that
// clients may simply `load` all of their candidates.
if (!file_exists($path)) {
$this->config = [];
return $this;
}
$this->config = (array) Yaml::parse(file_get_contents($path));
return $this;
}
}