Completed
Push — master ( 15a7c5...a9adfd )
by Kevin
02:15
created

AbstractOutput::printToken()

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 1
ccs 0
cts 0
cp 0
nc 1
1
<?php
2
3
namespace Groundskeeper\Output;
4
5
use Groundskeeper\Tokens\Token;
6
7
abstract class AbstractOutput
8
{
9
    /**
10
     * Will print out HTML from tokens.
11
     *
12
     * @param array $tokens
13
     *
14
     * @return string
15
     */
16
    public function printTokens(array $tokens)
17
    {
18
        $output = '';
19
        foreach ($tokens as $token) {
20
            $output .= $this->printToken($token);
21
        }
22
23
        return $output;
24
    }
25
26
    abstract protected function printToken(Token $token);
27
}
28