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

AbstractPageContentView::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
rs 9.4286
cc 1
eloc 3
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\AbstractViewModel;
12
use Ingenerator\KohanaView\ViewModel\PageContentView;
13
use Ingenerator\KohanaView\ViewModel\PageLayoutView;
14
15
/**
16
 * Provides a base class for all views that are intended to be the main view on a page, to
17
 * allow the use of the PageLayoutRenderer to dynamically wrap the rendered output in a separate
18
 * PageLayoutView when appropriate.
19
 *
20
 * This also allows the page content view to have access to the containing page - for example
21
 * to set the title or otherwise interact with the <head> and <meta> parts of the page.
22
 *
23
 * @property-read PageLayoutView $page
24
 *
25
 * @package Ingenerator\KohanaView\ViewModel\PageLayout
26
 */
27
abstract class AbstractPageContentView extends AbstractViewModel implements PageContentView
28
{
29
30
    /**
31
     * @var PageLayoutView
32
     */
33
    protected $page_view;
34
35
    public function __construct(PageLayoutView $page)
36
    {
37
        $this->page_view = $page;
38
        parent::__construct();
39
    }
40
41
    /**
42
     * @return PageLayoutView
43
     */
44
    public function var_page()
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...
45
    {
46
        return $this->page_view;
47
    }
48
49
}
50