for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* 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\DataProvider;
final class DataProviderManager
{
/**
* @var DataProviderInterface[]
private $dataProviders = [];
public function registerDataProvider(string $name, DataProviderInterface $dataProvider)
$this->dataProviders[$name] = $dataProvider;
}
public function dataProviders() : array
return array_keys($this->dataProviders);
public function dataProvider(string $name) : DataProviderInterface
return $this->dataProviders[$name];