PHP 클래스 TQ\Vcs\StreamWrapper\RepositoryRegistry

상속: implements Countable
파일 보기 프로젝트 열기: teqneers/php-stream-wrapper-for-git 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$map array The repository map

공개 메소드들

메소드 설명
addRepositories ( array $repositories ) : RepositoryRegistry Adds multiple repositories
addRepository ( string $key, TQ\Vcs\Repository\RepositoryInterface $repository ) : RepositoryRegistry Adds a single repository
count ( ) : integer Count elements of an object
getRepository ( string $key ) : TQ\Vcs\Repository\RepositoryInterface Returns the repository if it is registered in the map, throws exception otherwise
hasRepository ( string $key ) : boolean Returns true if the repository is registered in the map
tryGetRepository ( string $key ) : TQ\Vcs\Repository\RepositoryInterface | null Returns the repository if it is registered in the map, NULL otherwise

메소드 상세

addRepositories() 공개 메소드

Adds multiple repositories
public addRepositories ( array $repositories ) : RepositoryRegistry
$repositories array The repositories (key => repository)
리턴 RepositoryRegistry

addRepository() 공개 메소드

Adds a single repository
public addRepository ( string $key, TQ\Vcs\Repository\RepositoryInterface $repository ) : RepositoryRegistry
$key string The key
$repository TQ\Vcs\Repository\RepositoryInterface The repository
리턴 RepositoryRegistry

count() 공개 메소드

Count elements of an object
public count ( ) : integer
리턴 integer The custom count as an integer

getRepository() 공개 메소드

Returns the repository if it is registered in the map, throws exception otherwise
public getRepository ( string $key ) : TQ\Vcs\Repository\RepositoryInterface
$key string The key
리턴 TQ\Vcs\Repository\RepositoryInterface

hasRepository() 공개 메소드

Returns true if the repository is registered in the map
public hasRepository ( string $key ) : boolean
$key string The key
리턴 boolean

tryGetRepository() 공개 메소드

Returns the repository if it is registered in the map, NULL otherwise
public tryGetRepository ( string $key ) : TQ\Vcs\Repository\RepositoryInterface | null
$key string The key
리턴 TQ\Vcs\Repository\RepositoryInterface | null

프로퍼티 상세

$map 보호되어 있는 프로퍼티

The repository map
protected array $map
리턴 array