1<?php
2
3/*
4 * This file is part of Twig.
5 *
6 * (c) Fabien Potencier
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Twig;
13
14/**
15 * Holds information about a non-compiled Twig template.
16 *
17 * @final
18 *
19 * @author Fabien Potencier <fabien@symfony.com>
20 */
21class Source
22{
23    private $code;
24    private $name;
25    private $path;
26
27    /**
28     * @param string $code The template source code
29     * @param string $name The template logical name
30     * @param string $path The filesystem path of the template if any
31     */
32    public function __construct($code, $name, $path = '')
33    {
34        $this->code = $code;
35        $this->name = $name;
36        $this->path = $path;
37    }
38
39    public function getCode()
40    {
41        return $this->code;
42    }
43
44    public function getName()
45    {
46        return $this->name;
47    }
48
49    public function getPath()
50    {
51        return $this->path;
52    }
53}
54
55class_alias('Twig\Source', 'Twig_Source');
56