1 | <?php |
||
14 | class ViewResolver |
||
15 | { |
||
16 | /** |
||
17 | * @var ContainerInterface |
||
18 | */ |
||
19 | protected $container; |
||
20 | |||
21 | /** |
||
22 | * @var ViewNameParser |
||
23 | */ |
||
24 | protected $parser; |
||
25 | |||
26 | public function __construct(ContainerInterface $container, ViewNameParser $parser) |
||
31 | |||
32 | /** |
||
33 | * @param string $view A short notation view (a:b:c) AppBundle:Default:homepage |
||
34 | * @param mixed $data |
||
35 | * |
||
36 | * @return mixed |
||
37 | */ |
||
38 | public function renderOne($view, $data) |
||
45 | |||
46 | /** |
||
47 | * @param string $view A short notation view (a:b:c) AppBundle:Default:homepage |
||
48 | * @param array $data |
||
49 | * @param bool $preserveKeys |
||
50 | * |
||
51 | * @return array |
||
52 | */ |
||
53 | public function renderMany($view, $data, $preserveKeys = false) |
||
67 | |||
68 | /** |
||
69 | * @param string $view A short notation view (a:b:c) AppBundle:Default:homepage |
||
70 | * |
||
71 | * @return callable |
||
72 | */ |
||
73 | public function getView($view) |
||
103 | |||
104 | protected function createView($view) |
||
118 | |||
119 | protected function instantiateView($class) |
||
133 | |||
134 | } |
||
135 |