1 | <?php |
||
7 | abstract class AbstractOutput |
||
8 | { |
||
9 | /** |
||
10 | * Will print out HTML from tokens. |
||
11 | * |
||
12 | * @param array $tokens |
||
13 | * |
||
14 | * @return string |
||
15 | */ |
||
16 | 10 | public function printTokens(array $tokens) |
|
17 | { |
||
18 | 10 | $output = ''; |
|
19 | 10 | foreach ($tokens as $token) { |
|
20 | 10 | $output .= $this->printToken($token); |
|
21 | 10 | } |
|
22 | |||
23 | 10 | return $output; |
|
24 | } |
||
25 | |||
26 | abstract protected function printToken(Token $token); |
||
27 | } |
||
28 |