1 | <?php |
||
17 | abstract class AbstractMergeTemplate |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * Repository connector. |
||
22 | * |
||
23 | * @var Connector |
||
24 | */ |
||
25 | protected $repositoryConnector; |
||
26 | |||
27 | /** |
||
28 | * Revision log factory. |
||
29 | * |
||
30 | * @var RevisionLogFactory |
||
31 | */ |
||
32 | protected $revisionLogFactory; |
||
33 | |||
34 | /** |
||
35 | * Creates commit message builder instance. |
||
36 | * |
||
37 | * @param Connector $repository_connector Repository connector. |
||
38 | * @param RevisionLogFactory $revision_log_factory Revision log factory. |
||
39 | */ |
||
40 | 13 | public function __construct( |
|
41 | Connector $repository_connector, |
||
42 | RevisionLogFactory $revision_log_factory |
||
43 | ) { |
||
44 | 13 | $this->repositoryConnector = $repository_connector; |
|
45 | 13 | $this->revisionLogFactory = $revision_log_factory; |
|
46 | 13 | } |
|
47 | |||
48 | /** |
||
49 | * Returns merge template name. |
||
50 | * |
||
51 | * @return string |
||
52 | */ |
||
53 | abstract public function getName(); |
||
54 | |||
55 | /** |
||
56 | * Applies merge template to a working copy. |
||
57 | * |
||
58 | * @param string $wc_path Working copy path. |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | abstract public function apply($wc_path); |
||
63 | |||
64 | /** |
||
65 | * Flattens groups in revisions. |
||
66 | * |
||
67 | * @param array $grouped_revisions Grouped revisions. |
||
68 | * |
||
69 | * @return array |
||
70 | */ |
||
71 | 6 | protected function flattenMergedRevisions(array $grouped_revisions) |
|
79 | |||
80 | } |
||
81 |