DirectRenderer::getTemplate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace kalanis\kw_table\output_direct;
4
5
6
use kalanis\kw_table\core\Table;
7
8
9
/**
10
 * Class DirectRenderer
11
 * @package kalanis\kw_table\output_direct
12
 * Direct renderer into PHP template
13
 */
14
class DirectRenderer extends Table\AOutput
15
{
16
    protected Template $template;
17
18
    public function __construct(Table $table)
19
    {
20
        parent::__construct($table);
21
        $this->template = new Template();
22
    }
23
24
    public function getTemplate(): Template
25
    {
26
        return $this->template;
27
    }
28
29
    public function render(): string
30
    {
31
        return $this->template->render($this->table);
32
    }
33
}
34