Conditions | 5 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function __construct(array $options = null) |
||
21 | { |
||
22 | if (null === $options) { |
||
23 | throw new FileStorageMisconfiguration(); |
||
24 | } |
||
25 | if (!isset($options['path'])) { |
||
26 | throw new FileStorageMisconfiguration('Please set path for file storage driver.'); |
||
27 | } |
||
28 | if (!is_dir($options['path']) || !is_readable($options['path'])) { |
||
29 | throw new \Millennium\Cache\Exceptions\FileStorage\FileStorageDirectoryNotReadableException($options['path']); |
||
30 | } |
||
31 | $this->cachePath = rtrim($options['path'], DIRECTORY_SEPARATOR); |
||
32 | } |
||
33 | |||
77 |