@@ 8-22 (lines=15) @@ | ||
5 | /** |
|
6 | * Commend token type. |
|
7 | */ |
|
8 | class Comment extends AbstractValuedToken implements NonParticipating |
|
9 | { |
|
10 | public function getType() : string |
|
11 | { |
|
12 | return Token::COMMENT; |
|
13 | } |
|
14 | ||
15 | /** |
|
16 | * Required by the Token interface. |
|
17 | */ |
|
18 | public function toHtml(string $prefix, string $suffix) : string |
|
19 | { |
|
20 | return $prefix . '<!-- ' . $this->getValue() . ' -->' . $suffix; |
|
21 | } |
|
22 | } |
|
23 |
@@ 5-19 (lines=15) @@ | ||
2 | ||
3 | namespace Groundskeeper\Tokens; |
|
4 | ||
5 | class Php extends AbstractValuedToken implements NonParticipating |
|
6 | { |
|
7 | public function getType() : string |
|
8 | { |
|
9 | return Token::PHP; |
|
10 | } |
|
11 | ||
12 | /** |
|
13 | * Required by the Token interface. |
|
14 | */ |
|
15 | public function toHtml(string $prefix, string $suffix) : string |
|
16 | { |
|
17 | return $prefix . '<?php ' . $this->getValue() . ' ?>' . $suffix; |
|
18 | } |
|
19 | } |
|
20 |