Completed
Push — master ( 788440...382d5e )
by Daniel
08:36
created

template   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 28
ccs 11
cts 11
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A clear() 0 4 1
A render_view() 0 13 1
1
<?php
2
/**
3
 *
4
 * @package sitemaker
5
 * @copyright (c) 2013 Daniel A. (blitze)
6
 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
7
 *
8
 */
9
10
namespace blitze\sitemaker\services;
11
12
class template extends \phpbb\template\twig\twig
13
{
14 1
	public function clear()
15
	{
16 1
		$this->context->clear();
17 1
	}
18
19
	/**
20
	 * Render Template View
21
	 *
22
	 * @param string $ext_name		extension name in form namespace/extension
23
	 * @param string $tpl_file		html template file
24
	 * @param string $handle		template handle
25
	 */
26 1
	public function render_view($ext_name, $tpl_file, $handle)
27
	{
28 1
		$this->set_style(array("ext/$ext_name/styles", 'styles'));
29
30 1
		$this->set_filenames(array(
31 1
			$handle	=> $tpl_file)
32 1
		);
33
34 1
		$view = $this->assign_display($handle);
35 1
		$this->context->clear();
36
37 1
		return $view;
38
	}
39
}
40