Completed
Pull Request — master (#491)
by Richard
10:43
created

RenderAbstract::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
ccs 3
cts 3
cp 1
crap 1
1
<?php
2
/*
3
 You may not change or alter any portion of this comment or credits
4
 of supporting developers from this source code or any supporting source code
5
 which is considered copyrighted (c) material of the original comment or credit authors.
6
7
 This program is distributed in the hope that it will be useful,
8
 but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
 */
11
12
namespace Xoops\Html\Menu\Render;
13
14
use Xoops\Html\Menu\Item;
15
use Xoops\Html\Menu\ItemList;
16
17
/**
18
 * RenderAbstract - base render class
19
 *
20
 * @category  Xoops\Html\Menu\Render
21
 * @package   RenderAbstract
22
 * @author    Richard Griffith <[email protected]>
23
 * @copyright 2016 XOOPS Project (http://xoops.org)
24
 * @license   GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
25
 * @link      http://xoops.org
26
 */
27
abstract class RenderAbstract
28
{
29
    /** @var \Xoops */
30
    protected $xoops;
31
32
    /**
33
     * BreadCrumb constructor.
34
     */
35 3
    public function __construct()
36
    {
37 3
        $this->xoops = \Xoops::getInstance();
38 3
    }
39
40
    /**
41
     * render menu from ItemList
42
     *
43
     * @param ItemList $menu menu items
44
     *
45
     * @return string rendered HTML for menu
46
     */
47
    abstract public function render(ItemList $menu);
48
}
49