| 1 | <?php |
||
| 26 | class LazyInclude implements LazyInterface |
||
| 27 | { |
||
| 28 | /** |
||
| 29 | * The file to include. |
||
| 30 | * |
||
| 31 | * @var string|LazyInterface |
||
| 32 | */ |
||
| 33 | protected $file; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Constructor. |
||
| 37 | * |
||
| 38 | * @param string|LazyInterface $file The file to include. |
||
| 39 | */ |
||
| 40 | 1 | public function __construct(string $file) |
|
| 44 | |||
| 45 | /** |
||
| 46 | * Invokes the closure to include the file. |
||
| 47 | * |
||
| 48 | * @return mixed The return from the included file, if any. |
||
| 49 | */ |
||
| 50 | 1 | public function __invoke() |
|
| 54 | } |
||
| 55 |