Completed
Branch master (8f7741)
by
unknown
02:56
created

Parser::getOutput()   A

Complexity

Conditions 1
Paths 1

Duplication

Lines 0
Ratio 0 %

Size

Total Lines 4
Code Lines 2

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
namespace Redaxscript\Content;
3
4
/**
5
 * parent class to parse content for pseudo tags
6
 *
7
 * @since 3.0.0
8
 *
9
 * @package Redaxscript
10
 * @category Content
11
 * @author Henry Ruhs
12
 */
13
14
class Parser extends ParserAbstract
15
{
16
	/**
17
	 * output of the parser
18
	 *
19
	 * @var string
20
	 */
21
22
	protected $_output;
23
24
	/**
25
	 * process the class
26
	 *
27
	 * @since 3.0.0
28
	 *
29
	 * @param string $content content to be parsed
30
	 * @param string $route route of the content
31
	 */
32
33
	public function process($content = null, $route = null)
34
	{
35
		$this->_output = $content;
36
37
		/* process */
38
39
		foreach ($this->_namespaceArray as $tagClass)
40
		{
41
			$tag = new $tagClass($this->_registry, $this->_request, $this->_language, $this->_config);
42
			$this->_output = $tag->process($this->_output, $route);
43
		}
44
	}
45
46
	/**
47
	 * get the output
48
	 *
49
	 * @since 3.0.0
50
	 *
51
	 * @return string
52
	 */
53
54
	public function getOutput()
55
	{
56
		return $this->_output;
57
	}
58
}