1 | <?php |
||
10 | class FilenameProxy implements \WPEmerge\View\EngineInterface { |
||
11 | /** |
||
12 | * Container key of default engine to use |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $default = WPEMERGE_VIEW_ENGINE_PHP_KEY; |
||
17 | |||
18 | /** |
||
19 | * Array of filename_suffix=>engine_container_key bindings |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $bindings = []; |
||
24 | |||
25 | /** |
||
26 | * Constructor |
||
27 | * |
||
28 | * @param array $bindings |
||
29 | * @param string $default |
||
30 | */ |
||
31 | 3 | public function __construct( $bindings, $default = '' ) { |
|
38 | |||
39 | /** |
||
40 | * {@inheritDoc} |
||
41 | */ |
||
42 | 1 | public function exists( $view ) { |
|
47 | |||
48 | /** |
||
49 | * {@inheritDoc} |
||
50 | */ |
||
51 | 1 | public function render( $views, $context ) { |
|
62 | |||
63 | /** |
||
64 | * Get the default binding |
||
65 | * |
||
66 | * @return string $binding |
||
67 | */ |
||
68 | 2 | public function getDefaultBinding() { |
|
71 | |||
72 | /** |
||
73 | * Get all bindings |
||
74 | * |
||
75 | * @return array $bindings |
||
76 | */ |
||
77 | 1 | public function getBindings() { |
|
80 | |||
81 | /** |
||
82 | * Get the engine key binding for a specific file |
||
83 | * |
||
84 | * @param string $file |
||
85 | * @return string |
||
86 | */ |
||
87 | 1 | public function getBindingForFile( $file ) { |
|
99 | } |
||
100 |