Basics   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 8

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 8
dl 0
loc 20
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 16 1
1
<?php
2
/* @description     Transformation Style Sheets - Revolutionising PHP templating    *
3
 * @author          Tom Butler [email protected]                                             *
4
 * @copyright       2017 Tom Butler <[email protected]> | https://r.je/                      *
5
 * @license         http://www.opensource.org/licenses/bsd-license.php  BSD License *
6
 * @version         1.2                                                             */
7
namespace Transphporm\Module;
8
/** Assigns all the basic properties repeat, comment, etc to a $builder instance */
9
class Basics implements \Transphporm\Module {
10
11
12
	public function load(\Transphporm\Config $config) {
13
		$data = $config->getFunctionSet();
14
		$headers = &$config->getHeaders();
15
16
		$content = new \Transphporm\Property\Content($config->getFormatter());
17
		$config->registerProperty('content', $content);
18
		$config->registerProperty('repeat', new \Transphporm\Property\Repeat($data, $config->getElementData(), $config->getLine(), $config->getFilePath()));
19
		$config->registerProperty('display', new \Transphporm\Property\Display);
20
		$config->registerProperty('bind', new \Transphporm\Property\Bind($config->getElementData()));
21
22
		$config->registerContentPseudo('attr', new \Transphporm\Property\ContentPseudo\Attr());
23
		$config->registerContentPseudo('before', new \Transphporm\Property\ContentPseudo\BeforeAfter('before', $content));
24
		$config->registerContentPseudo("after", new \Transphporm\Property\ContentPseudo\BeforeAfter('after', $content));
25
26
		$config->registerContentPseudo('header', new \Transphporm\Property\ContentPseudo\Headers($headers));
27
	}
28
}
29