PHP Class Gush\Factory\AdapterFactory

Show file Open project: gushphp/gush Class Usage Examples

Public Methods

Method Description
all ( ) : array[] Returns registered adapters.
allOfType ( string $type ) : array[] Returns all registered adapters of a specific type.
createConfigurator ( string $name, Symfony\Component\Console\Helper\HelperSet $helperSet, Config $globalConfig ) : Gush\Adapter\Configurator Creates a new Configurator instance for the given adapter.
createIssueTracker ( string $name, array $adapterConfig, Config $globalConfig ) : Gush\Adapter\IssueTracker Creates a new IssueTracker (IssueTracker object) with the given configuration.
createRepositoryManager ( string $name, array $adapterConfig, Config $globalConfig ) : Gush\Adapter\Adapter Creates a new RepositoryManager (Adapter object) with the given configuration.
get ( string $name ) : array[] Returns the requested adapter-factory configuration.
has ( string $name ) : boolean Returns whether adapter by name is registered.
register ( string $name, string $label, object | string $adapterFactory )
supports ( string $name, string $supports ) : boolean Returns whether the adapter by name supports the requirements.

Private Methods

Method Description
getFactoryObject ( string $name ) : Gush\Factory\IssueTrackerFactory | Gush\Factory\RepositoryManagerFactory
guardFactoryClassImplementation ( $adapterFactory, $label )

Method Details

all() public method

Returns registered adapters.
public all ( ) : array[]
return array[]

allOfType() public method

Returns all registered adapters of a specific type.
public allOfType ( string $type ) : array[]
$type string AdapterFactory::SUPPORT_REPOSITORY_MANAGER or AdapterFactorySUPPORT_ISSUE_TRACKER
return array[]

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

createIssueTracker() public method

Creates a new IssueTracker (IssueTracker object) with the given configuration.
public createIssueTracker ( string $name, array $adapterConfig, Config $globalConfig ) : Gush\Adapter\IssueTracker
$name string
$adapterConfig array
$globalConfig Gush\Config
return Gush\Adapter\IssueTracker

createRepositoryManager() public method

Creates a new RepositoryManager (Adapter object) with the given configuration.
public createRepositoryManager ( string $name, array $adapterConfig, Config $globalConfig ) : Gush\Adapter\Adapter
$name string
$adapterConfig array
$globalConfig Gush\Config
return Gush\Adapter\Adapter

get() public method

Returns the requested adapter-factory configuration.
public get ( string $name ) : array[]
$name string
return array[]

has() public method

Returns whether adapter by name is registered.
public has ( string $name ) : boolean
$name string
return boolean

register() public method

public register ( string $name, string $label, object | string $adapterFactory )
$name string
$label string
$adapterFactory object | string

supports() public method

Returns whether the adapter by name supports the requirements.
public supports ( string $name, string $supports ) : boolean
$name string
$supports string
return boolean