Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
15 | public function persist(Resource $resource) |
||
16 | { |
||
17 | $path = $this->getResultPath() . $this->getFileSystemPath($resource); |
||
18 | if (! is_dir($path)) { |
||
19 | mkdir($path, 0777, true); |
||
20 | } |
||
21 | $file = new \SplFileObject($path . DIRECTORY_SEPARATOR . $this->getFileSystemFilename($resource), 'w'); |
||
22 | $this->totalSizePersisted += $file->fwrite(serialize($resource)); |
||
23 | } |
||
24 | |||
46 |