@@ 7-24 (lines=18) @@ | ||
4 | ||
5 | use Groundskeeper\Configuration; |
|
6 | ||
7 | class CData extends AbstractValuedToken |
|
8 | { |
|
9 | /** |
|
10 | * Constructor |
|
11 | */ |
|
12 | public function __construct(Configuration $configuration, $value = null) |
|
13 | { |
|
14 | parent::__construct(Token::CDATA, $configuration, $value); |
|
15 | } |
|
16 | ||
17 | /** |
|
18 | * Required by the Token interface. |
|
19 | */ |
|
20 | public function toHtml($prefix, $suffix) |
|
21 | { |
|
22 | return $prefix . '<![CDATA[' . $this->getValue() . ']]>' . $suffix; |
|
23 | } |
|
24 | } |
|
25 |
@@ 10-27 (lines=18) @@ | ||
7 | /** |
|
8 | * Commend token type. |
|
9 | */ |
|
10 | class Comment extends AbstractValuedToken |
|
11 | { |
|
12 | /** |
|
13 | * Constructor |
|
14 | */ |
|
15 | public function __construct(Configuration $configuration, $value = null) |
|
16 | { |
|
17 | parent::__construct(Token::COMMENT, $configuration, $value); |
|
18 | } |
|
19 | ||
20 | /** |
|
21 | * Required by the Token interface. |
|
22 | */ |
|
23 | public function toHtml($prefix, $suffix) |
|
24 | { |
|
25 | return $prefix . '<!-- ' . $this->getValue() . ' -->' . $suffix; |
|
26 | } |
|
27 | } |
|
28 |
@@ 7-24 (lines=18) @@ | ||
4 | ||
5 | use Groundskeeper\Configuration; |
|
6 | ||
7 | class Text extends AbstractValuedToken |
|
8 | { |
|
9 | /** |
|
10 | * Constructor |
|
11 | */ |
|
12 | public function __construct(Configuration $configuration, $value = null) |
|
13 | { |
|
14 | parent::__construct(Token::TEXT, $configuration, $value); |
|
15 | } |
|
16 | ||
17 | /** |
|
18 | * Required by the Token interface. |
|
19 | */ |
|
20 | public function toHtml($prefix, $suffix) |
|
21 | { |
|
22 | return $prefix . $this->getValue() . $suffix; |
|
23 | } |
|
24 | } |
|
25 |
@@ 7-24 (lines=18) @@ | ||
4 | ||
5 | use Groundskeeper\Configuration; |
|
6 | ||
7 | class Php extends AbstractValuedToken |
|
8 | { |
|
9 | /** |
|
10 | * Constructor |
|
11 | */ |
|
12 | public function __construct(Configuration $configuration, $value = null) |
|
13 | { |
|
14 | parent::__construct(Token::PHP, $configuration, $value); |
|
15 | } |
|
16 | ||
17 | /** |
|
18 | * Required by the Token interface. |
|
19 | */ |
|
20 | public function toHtml($prefix, $suffix) |
|
21 | { |
|
22 | return $prefix . '<?php ' . $this->getValue() . ' ?>' . $suffix; |
|
23 | } |
|
24 | } |
|
25 |