PHP Class TQ\Vcs\StreamWrapper\RepositoryRegistry

Inheritance: implements Countable
Afficher le fichier Open project: teqneers/php-stream-wrapper-for-git Class Usage Examples

Protected Properties

Свойство Type Description
$map array The repository map

Méthodes publiques

Méthode Description
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

Method Details

addRepositories() public méthode

Adds multiple repositories
public addRepositories ( array $repositories ) : RepositoryRegistry
$repositories array The repositories (key => repository)
Résultat RepositoryRegistry

addRepository() public méthode

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
Résultat RepositoryRegistry

count() public méthode

Count elements of an object
public count ( ) : integer
Résultat integer The custom count as an integer

getRepository() public méthode

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
Résultat TQ\Vcs\Repository\RepositoryInterface

hasRepository() public méthode

Returns true if the repository is registered in the map
public hasRepository ( string $key ) : boolean
$key string The key
Résultat boolean

tryGetRepository() public méthode

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
Résultat TQ\Vcs\Repository\RepositoryInterface | null

Property Details

$map protected_oe property

The repository map
protected array $map
Résultat array