| 1 | <?php |
||
| 7 | abstract class PropertyFileDirectory |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var \SplFileInfo |
||
| 11 | */ |
||
| 12 | protected $basePath; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var PropertyFiles |
||
| 16 | */ |
||
| 17 | private $files; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param \SplFileInfo $basePath |
||
| 21 | * @param PropertyFiles $files |
||
| 22 | */ |
||
| 23 | public function __construct(\SplFileInfo $basePath, PropertyFiles $files) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param Property $property |
||
| 31 | * @return PropertyFile |
||
| 32 | */ |
||
| 33 | abstract protected function createFileForProperty(Property $property); |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param Property $property |
||
| 37 | * @return PropertyFile |
||
| 38 | */ |
||
| 39 | public function addFileForProperty(Property $property) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param Property $property |
||
| 48 | * @return PropertyFile|null |
||
| 49 | * @throws UnexpectedValueException |
||
| 50 | */ |
||
| 51 | public function getFileForProperty(Property $property) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param Property $property |
||
| 58 | * @param string[] $ranges |
||
| 59 | */ |
||
| 60 | public function writeProperty(Property $property, array $ranges) |
||
| 65 | } |