for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is a part of Sculpin.
*
* (c) Dragonfly Development Inc.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symplify\PHP7_Sculpin\Configuration;
use Dflydev\DotAccessConfiguration\Configuration;
use Dflydev\DotAccessConfiguration\ConfigurationInterface;
use Symfony\Component\Yaml\Yaml;
final class SiteConfigurationFactory
{
/**
* @var string
private $rootDir;
public function __construct(string $rootDir)
$this->rootDir = $rootDir;
}
public function create() : ConfigurationInterface
$configuration = new Configuration();
if (file_exists($file = $this->rootDir.'/config/sculpin_site.yml')) {
$configuration->importRaw(
Yaml::parse(file_get_contents($file))
);
return $configuration;