AMultipleValue::getLabel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace kalanis\kw_table\core\Connector;
4
5
6
use kalanis\kw_connect\core\Interfaces\IIterableConnector;
7
use kalanis\kw_forms\Exceptions\RenderException;
8
use kalanis\kw_table\core\TableException;
9
10
11
/**
12
 * Class AMultipleValue
13
 * @package kalanis\kw_table\core\Connector
14
 * Connect multiple fields on one column in filter - abstract
15
 */
16
abstract class AMultipleValue
17
{
18
    protected string $alias = '';
19
    protected ?string $label = null;
20
    protected string $columnName = '';
21
22 2
    public function setColumn(string $columnName): void
23
    {
24 2
        $this->columnName = $columnName;
25 2
    }
26
27 2
    public function setAlias(string $alias): void
28
    {
29 2
        $this->alias = $alias;
30 2
    }
31
32
    abstract public function getAlias(): string;
33
34 1
    public function setLabel(string $label): void
35
    {
36 1
        $this->label = $label;
37 1
    }
38
39 3
    public function getLabel(): ?string
40
    {
41 3
        return $this->label;
42
    }
43
44
    abstract public function setDataSourceConnector(IIterableConnector $dataSource): void;
45
46
    /**
47
     * @throws TableException
48
     */
49
    abstract public function add(): void;
50
51
    /**
52
     * @throws RenderException
53
     * @return string
54
     */
55
    abstract public function renderContent(): string;
56
}
57