PHP Класс Gush\Factory\AdapterFactory

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
getFactoryObject ( string $name ) : Gush\Factory\IssueTrackerFactory | Gush\Factory\RepositoryManagerFactory
guardFactoryClassImplementation ( $adapterFactory, $label )

Описание методов

all() публичный Метод

Returns registered adapters.
public all ( ) : array[]
Результат array[]

allOfType() публичный Метод

Returns all registered adapters of a specific type.
public allOfType ( string $type ) : array[]
$type string AdapterFactory::SUPPORT_REPOSITORY_MANAGER or AdapterFactorySUPPORT_ISSUE_TRACKER
Результат array[]

createConfigurator() публичный Метод

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
Результат Gush\Adapter\Configurator

createIssueTracker() публичный Метод

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
Результат Gush\Adapter\IssueTracker

createRepositoryManager() публичный Метод

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
Результат Gush\Adapter\Adapter

get() публичный Метод

Returns the requested adapter-factory configuration.
public get ( string $name ) : array[]
$name string
Результат array[]

has() публичный Метод

Returns whether adapter by name is registered.
public has ( string $name ) : boolean
$name string
Результат boolean

register() публичный Метод

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

supports() публичный Метод

Returns whether the adapter by name supports the requirements.
public supports ( string $name, string $supports ) : boolean
$name string
$supports string
Результат boolean