Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
14 | public function __construct($channel, $logDir, RequestInterface $requestInterface) |
||
15 | { |
||
16 | $this->channel = $channel; |
||
17 | $this->logDir = $logDir; |
||
18 | |||
19 | if (!is_readable($this->logDir)) { |
||
20 | throw new ApplicationException('Log directory not readable'); |
||
21 | } |
||
22 | if (!is_writable($this->logDir)) { |
||
23 | throw new ApplicationException('Log directory not writeable'); |
||
24 | } |
||
25 | $this->logPath = sprintf('%s%s.log', $this->logDir, $this->channel); |
||
26 | |||
27 | $this->requestInterface = $requestInterface; |
||
28 | } |
||
56 |