| 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 | * Get the default binding |
||
| 41 | * |
||
| 42 | * @return string $binding |
||
| 43 | */ |
||
| 44 | 2 | public function getDefaultBinding() { |
|
| 47 | |||
| 48 | /** |
||
| 49 | * Get all bindings |
||
| 50 | * |
||
| 51 | * @return array $bindings |
||
| 52 | */ |
||
| 53 | 1 | public function getBindings() { |
|
| 56 | |||
| 57 | /** |
||
| 58 | * Get the engine key binding for a specific file |
||
| 59 | * |
||
| 60 | * @param string $file |
||
| 61 | * @return string |
||
| 62 | */ |
||
| 63 | 1 | public function getBindingForFile( $file ) { |
|
| 75 | |||
| 76 | /** |
||
| 77 | * {@inheritDoc} |
||
| 78 | */ |
||
| 79 | 1 | public function render( $file, $context ) { |
|
| 84 | } |
||
| 85 |