Security update to Drupal 8.4.6
[yaffs-website] / vendor / twig / twig / lib / Twig / Source.php
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
12 /**
13  * Holds information about a non-compiled Twig template.
14  *
15  * @final
16  *
17  * @author Fabien Potencier <fabien@symfony.com>
18  */
19 class Twig_Source
20 {
21     private $code;
22     private $name;
23     private $path;
24
25     /**
26      * @param string $code The template source code
27      * @param string $name The template logical name
28      * @param string $path The filesystem path of the template if any
29      */
30     public function __construct($code, $name, $path = '')
31     {
32         $this->code = $code;
33         $this->name = $name;
34         $this->path = $path;
35     }
36
37     public function getCode()
38     {
39         return $this->code;
40     }
41
42     public function getName()
43     {
44         return $this->name;
45     }
46
47     public function getPath()
48     {
49         return $this->path;
50     }
51 }
52
53 class_alias('Twig_Source', 'Twig\Source', false);