summaryrefslogtreecommitdiff
path: root/src/Renderer/EngineInterface.php
blob: 3bce9c02a2d953d9ae75bb0e70e93e61ea16f674 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

namespace Engelsystem\Renderer;

interface EngineInterface
{
    /**
     * Render a template
     *
     * @param string  $path
     * @param mixed[] $data
     * @return string
     */
    public function get(string $path, array $data = []): string;

    /**
     * @param string $path
     * @return bool
     */
    public function canRender(string $path): bool;

    /**
     * @param string|mixed[] $key
     * @param mixed          $value
     */
    public function share($key, $value = null);
}