| 1 | <?php |
||
| 21 | trait PreloadTrait |
||
| 22 | { |
||
| 23 | protected $preloadVars; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Constructor. |
||
| 27 | */ |
||
| 28 | 2 | public function __construct() |
|
| 32 | |||
| 33 | /** |
||
| 34 | * {@inheritdoc} |
||
| 35 | */ |
||
| 36 | 2 | final protected function find(string $name) |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @param array $vars |
||
| 47 | * |
||
| 48 | * @return array |
||
| 49 | */ |
||
| 50 | final protected function filter(array $vars): array |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Get all variables |
||
| 59 | * |
||
| 60 | * @return array |
||
| 61 | */ |
||
| 62 | abstract protected function preload(): array; |
||
| 63 | } |
||
| 64 |