Completed
Branch 2.0.x (e30486)
by Andrew
03:10
created

AbstractPageLayoutView::setTitle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * @author     Andrew Coulton <[email protected]>
4
 * @copyright  2015 inGenerator Ltd
5
 * @license    http://kohanaframework.org/license
6
 */
7
8
namespace Ingenerator\KohanaView\ViewModel\PageLayout;
9
10
11
use Ingenerator\KohanaView\ViewModel;
12
use Ingenerator\KohanaView\ViewModel\AbstractViewModel;
13
14
/**
15
 * Provides a base class for all views that are intended to provide a complete HTML template that will
16
 * contain some body html content - eg for the global site layout etc.
17
 *
18
 * It is commonly used together with a PageContentView but note you can always still create an instance
19
 * of this page layout and display any html string directly for simpler cases.
20
 *
21
 * @property-read string $body_html The content to display in the body HTML area
22
 * @property-read string $title     The page title
23
 *
24
 * @package Ingenerator\KohanaView\ViewModel\PageLayoutView
25
 */
26
abstract class AbstractPageLayoutView extends AbstractViewModel implements ViewModel\PageLayoutView
27
{
28
29
    /**
30
     * @var array
31
     */
32
    protected $variables = [
33
        'body_html' => NULL,
34
        'title'     => NULL,
35
    ];
36
37
    /**
38
     * @param string $title
39
     *
40
     * @return void
41
     */
42
    public function setTitle($title)
43
    {
44
        $this->variables['title'] = $title;
45
    }
46
47
    /**
48
     * @param string $html
49
     *
50
     * @return void
51
     */
52
    public function setBodyHTML($html)
1 ignored issue
show
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection seeker becomes databaseConnectionSeeker.

Loading history...
53
    {
54
        $this->variables['body_html'] = $html;
55
    }
56
57
}
58