| 1 | <?php |
||
| 15 | class Unfolder |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var Directory |
||
| 19 | */ |
||
| 20 | protected $directory; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var mixed |
||
| 24 | */ |
||
| 25 | protected $start_value; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param mixed $start_value |
||
| 29 | */ |
||
| 30 | 5 | public function __construct(Directory $directory, $start_value) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * Define the function to unfold the directory structure and perform |
||
| 38 | * the unfold operation. |
||
| 39 | * |
||
| 40 | * @param \Closure $unfolder a -> File|FDirectory a -> a |
||
| 41 | * @throws \LogicException When generated root node is a file. |
||
| 42 | */ |
||
| 43 | 5 | public function with(\Closure $unfolder) : void |
|
| 47 | } |
||
| 48 |