1 | <?php |
||
19 | abstract class Location |
||
20 | { |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $tempStorage = '/tmp'; |
||
25 | |||
26 | /** |
||
27 | * @var Roster |
||
28 | */ |
||
29 | protected $roster = null; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $directory; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $name; |
||
40 | |||
41 | /** |
||
42 | * @var string |
||
43 | */ |
||
44 | protected $hashesRosterFileName = 'hashes.roster'; |
||
45 | |||
46 | /** |
||
47 | * Location constructor. |
||
48 | * @param string $directory |
||
49 | */ |
||
50 | 39 | public function __construct($directory) |
|
54 | |||
55 | /** |
||
56 | * @return Roster |
||
57 | */ |
||
58 | 7 | public function getRoster() |
|
62 | |||
63 | /** |
||
64 | * @param Roster $roster |
||
65 | * @return $this |
||
66 | */ |
||
67 | 10 | public function setRoster(Roster $roster) |
|
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | */ |
||
76 | 17 | public function getDirectory() |
|
80 | |||
81 | /** |
||
82 | * @param string $directory |
||
83 | * @return $this |
||
84 | */ |
||
85 | 1 | public function setDirectory($directory) |
|
90 | |||
91 | /** |
||
92 | * @return string |
||
93 | */ |
||
94 | 1 | public function getHashesRosterFileName() |
|
98 | |||
99 | /** |
||
100 | * @param string $hashesRosterFileName |
||
101 | * @return $this |
||
102 | */ |
||
103 | 1 | public function setHashesRosterFileName($hashesRosterFileName) |
|
108 | |||
109 | /** |
||
110 | * @return bool |
||
111 | */ |
||
112 | abstract public function isValid(); |
||
113 | |||
114 | /** |
||
115 | * @return CommandChain |
||
116 | */ |
||
117 | abstract protected function getRosterListCommand(); |
||
118 | |||
119 | /** |
||
120 | * @return string |
||
121 | */ |
||
122 | abstract public function getName(); |
||
123 | |||
124 | /** |
||
125 | * @param RosterItem $rosterItem |
||
126 | * @return string |
||
127 | */ |
||
128 | abstract public function getFullPath(RosterItem $rosterItem); |
||
129 | |||
130 | /** |
||
131 | * {@inheritdoc} |
||
132 | */ |
||
133 | 6 | public function buildRoster() |
|
183 | |||
184 | |||
185 | /** |
||
186 | * @return CommandChain |
||
187 | */ |
||
188 | 6 | protected function buildPipeChainedCommands() |
|
220 | |||
221 | /** |
||
222 | * @return CommandChain |
||
223 | */ |
||
224 | 7 | protected function buildSequenceChainedCommands() |
|
234 | |||
235 | |||
236 | } |
||
237 |