1 | <?php |
||
11 | class CommandExecutionLock implements ICommandExecutionLock { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $lockFile; |
||
16 | |||
17 | /** |
||
18 | * CommandExecutionLock constructor. |
||
19 | * |
||
20 | * @param string $lockFile |
||
21 | */ |
||
22 | public function __construct($lockFile = null) { |
||
29 | |||
30 | /** |
||
31 | * @return string |
||
32 | */ |
||
33 | public function getLockFile() { |
||
36 | |||
37 | /** |
||
38 | * @param string $lockFile |
||
39 | */ |
||
40 | public function setLockFile($lockFile) { |
||
43 | |||
44 | /** |
||
45 | * @return array |
||
46 | */ |
||
47 | public function readLockFile() { |
||
64 | |||
65 | /** |
||
66 | * @param array $data |
||
67 | */ |
||
68 | public function writeLockFile(array $data) { |
||
74 | |||
75 | /** |
||
76 | * @param string $value |
||
77 | * |
||
78 | * @return bool |
||
79 | */ |
||
80 | public function isInLockFile($value) { |
||
83 | |||
84 | /** |
||
85 | * @param string $value |
||
86 | */ |
||
87 | public function addToLockFile($value) { |
||
92 | |||
93 | /** |
||
94 | * @param string $value |
||
95 | */ |
||
96 | public function removeFromLockFile($value) { |
||
101 | |||
102 | /** |
||
103 | * @param IConsole $console |
||
104 | * @param ICommand $command |
||
105 | */ |
||
106 | public function lockCommand(IConsole $console, ICommand $command) { |
||
128 | |||
129 | /** |
||
130 | * @return string |
||
131 | */ |
||
132 | protected function getDefaultLockFile() { |
||
135 | } |
||
136 |