Completed
Push — master ( 247d83...132dc2 )
by Tom
02:31
created

Functions   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 5
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 10 1
1
<?php
2
/* @description     Transformation Style Sheets - Revolutionising PHP templating    *
3
 * @author          Tom Butler [email protected]                                             *
4
 * @copyright       2015 Tom Butler <[email protected]> | https://r.je/                      *
5
 * @license         http://www.opensource.org/licenses/bsd-license.php  BSD License *
6
 * @version         1.0                                                             */
7
namespace Transphporm\Module;
8
/** Assigns all the basic functions, data(), key(), iteration(), template(), etc    */
9
class Functions implements \Transphporm\Module {
10
11
	public function load(\Transphporm\Config $config) {
12
		$functionSet = $config->getFunctionSet();
13
		$baseDir = &$config->getBaseDir();
14
15
		$functionSet->addFunction('attr', new \Transphporm\TSSFunction\Attr());
16
		$functionSet->addFunction('data', new \Transphporm\TSSFunction\Data($config->getElementData(), $functionSet, 'data'));
17
		$functionSet->addFunction('key', new \Transphporm\TSSFunction\Data($config->getElementData(), $functionSet, 'key'));
18
		$functionSet->addFunction('iteration', new \Transphporm\TSSFunction\Data($config->getElementData(), $functionSet, 'iteration'));
19
		$functionSet->addFunction('template', new \Transphporm\TSSFunction\Template($config->getElementData(), $baseDir));
20
	}
21
}