BaseRenderer::getClassName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/**
4
 * This software package is licensed under `AGPL, Commercial` license[s].
5
 *
6
 * @package maslosoft/zamm
7
 * @license AGPL, Commercial
8
 *
9
 * @copyright Copyright (c) Peter Maselkowski <[email protected]>
10
 * @link https://maslosoft.com/zamm/
11
 */
12
13
namespace Maslosoft\Zamm\Renderers;
14
15
use Maslosoft\Zamm\Interfaces\Extractors\ExtractorInterface;
16
use Maslosoft\Zamm\Interfaces\Renderers\RendererInterface;
17
18
/**
19
 * BaseRenderer
20
 *
21
 * @author Piotr Maselkowski <pmaselkowski at gmail.com>
22
 */
23
abstract class BaseRenderer implements RendererInterface
24
{
25
26
	/**
27
	 * Extractor
28
	 * @var ExtractorInterface
29
	 */
30
	protected $extractor;
31
32
	/**
33
	 * Extracted element name
34
	 * @var string
35
	 */
36
	protected $name = '';
37
38
	public function __construct(ExtractorInterface $extractor, $name = null)
39
	{
40
		$this->extractor = $extractor;
41
		$this->name = $name;
42
	}
43
44
	public function getClassName()
45
	{
46
		return $this->extractor->getClassName();
47
	}
48
49
	public function getName()
50
	{
51
		return $this->name;
52
	}
53
54
}
55