1 | <?php |
||
13 | class FileActionInspector extends AbstractActionInspector |
||
14 | { |
||
15 | /** @var string */ |
||
16 | private $filePath; |
||
17 | |||
18 | /** @var resource */ |
||
19 | private $fh; |
||
20 | |||
21 | /** |
||
22 | * FileActionInspector constructor. |
||
23 | * @param $filePath |
||
24 | */ |
||
25 | 2 | public function __construct($filePath) |
|
33 | |||
34 | /** |
||
35 | * @param ActionInterface $action |
||
36 | * @return boolean returns `false` if action is already exists in this state in the log |
||
37 | * @throws SchedulerException |
||
38 | */ |
||
39 | 2 | public function update(ActionInterface $action) |
|
61 | |||
62 | /** |
||
63 | * Close an open file pointer when class instance destructs. |
||
64 | */ |
||
65 | 2 | public function __destruct() |
|
69 | |||
70 | /** |
||
71 | * Get action messages from log file |
||
72 | * @return array |
||
73 | */ |
||
74 | 2 | private function getMessages() |
|
87 | |||
88 | /** |
||
89 | * Save action messages to file |
||
90 | * @param array $messages |
||
91 | */ |
||
92 | 2 | private function save(array $messages) |
|
97 | } |