Gush\Factory\AdapterFactory::createConfigurator PHP Method

createConfigurator() public method

Creates a new Configurator instance for the given adapter.
public createConfigurator ( string $name, Symfony\Component\Console\Helper\HelperSet $helperSet, Config $globalConfig ) : Gush\Adapter\Configurator
$name string Name of the adapter (must be registered)
$helperSet Symfony\Component\Console\Helper\HelperSet HelperSet object
$globalConfig Gush\Config
return Gush\Adapter\Configurator
    public function createConfigurator($name, HelperSet $helperSet, Config $globalConfig)
    {
        return $this->getFactoryObject($name)->createConfigurator($helperSet, $globalConfig);
    }

Usage Example

コード例 #1
0
ファイル: AdapterFactoryTest.php プロジェクト: gushphp/gush
 public function testCreateConfigurator()
 {
     $repoManager = new TestAdapterFactory();
     $this->adapterFactory->register('test', 'Testing', $repoManager);
     $createdConfigurator = $this->adapterFactory->createConfigurator('test', $this->prophesize('Symfony\\Component\\Console\\Helper\\HelperSet')->reveal(), $this->config);
     $this->assertInstanceOf(Configurator::class, $createdConfigurator);
 }