Data.php
3 years ago
Directory.php
3 years ago
FileExtension.php
3 years ago
Folder.php
3 years ago
Folders.php
3 years ago
Func.php
3 years ago
Functions.php
3 years ago
Name.php
3 years ago
Template.php
3 years ago
FileExtension.php
42 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP\League\Plates\Template; |
| 4 | |
| 5 | /** |
| 6 | * Template file extension. |
| 7 | */ |
| 8 | class FileExtension |
| 9 | { |
| 10 | /** |
| 11 | * Template file extension. |
| 12 | * @var string |
| 13 | */ |
| 14 | protected $fileExtension; |
| 15 | /** |
| 16 | * Create new FileExtension instance. |
| 17 | * @param null|string $fileExtension |
| 18 | */ |
| 19 | public function __construct($fileExtension = 'php') |
| 20 | { |
| 21 | $this->set($fileExtension); |
| 22 | } |
| 23 | /** |
| 24 | * Set the template file extension. |
| 25 | * @param null|string $fileExtension |
| 26 | * @return FileExtension |
| 27 | */ |
| 28 | public function set($fileExtension) |
| 29 | { |
| 30 | $this->fileExtension = $fileExtension; |
| 31 | return $this; |
| 32 | } |
| 33 | /** |
| 34 | * Get the template file extension. |
| 35 | * @return string |
| 36 | */ |
| 37 | public function get() |
| 38 | { |
| 39 | return $this->fileExtension; |
| 40 | } |
| 41 | } |
| 42 |