1<?php
2
3/*
4 * This file is part of Mustache.php.
5 *
6 * (c) 2010-2017 Justin Hileman
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12/**
13 * Mustache template Source interface.
14 */
15interface Mustache_Source
16{
17    /**
18     * Get the Source key (used to generate the compiled class name).
19     *
20     * This must return a distinct key for each template source. For example, an
21     * MD5 hash of the template contents would probably do the trick. The
22     * ProductionFilesystemLoader uses mtime and file path. If your production
23     * source directory is under version control, you could use the current Git
24     * rev and the file path...
25     *
26     * @throws RuntimeException when a source file cannot be read
27     *
28     * @return string
29     */
30    public function getKey();
31
32    /**
33     * Get the template Source.
34     *
35     * @throws RuntimeException when a source file cannot be read
36     *
37     * @return string
38     */
39    public function getSource();
40}
41