This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
/
RepositoryStack.txt
59 lines (35 loc) · 1.68 KB
/
RepositoryStack.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
-----------------------------------------------
Baleen\\Migrations\\VersionRepository\\RepositoryStack
-----------------------------------------------
.. php:namespace: Baleen\\Migrations\\VersionRepository
.. php:class:: RepositoryStack
A generic repository that can aggregate one or more other repositories
.. php:method:: __construct()
RepositoryStack constructor.
.. php:method:: addRepository(MigrationRepositoryInterface $repo)
Adds a single repository to the stack
:type $repo: MigrationRepositoryInterface
:param $repo:
.. php:method:: addRepositories($repositories)
Adds a set of repositories to the stack
:param $repositories:
.. php:method:: getRepositories()
Returns the stack
:returns: \SplStack|MigrationRepositoryInterface[]
.. php:method:: setRepositories($repositories)
Resets the stack to the specified repositories
:type $repositories: array|\Traversable
:param $repositories:
.. php:method:: fetchAll()
Fetches all versions available to all repositories in the stack and
returns them as a Linked collection.
The returned collection contains versions groups sequentially into groups
that correspond to each sub-repository.
Each of those groups is sorted with the repository's own comparator.
Therefore, its strongly recommended not to sort or modify the resulting
collection.
:returns: Linked
.. php:method:: setMigrationFactory(FactoryInterface $factory)
Sets the migration factory for ALL repositories in the stack.
:type $factory: FactoryInterface
:param $factory: