-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathView.php
More file actions
85 lines (70 loc) · 1.58 KB
/
Copy pathView.php
File metadata and controls
85 lines (70 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
namespace Core;
class View
{
private $captureTo = 'content';
private $variables = [];
private $template = '';
private $autoext = true;
private $headers = [];
private $console = false;
public function __construct(array $variables = null)
{
if ($variables != null)
{
$this->variables = $variables;
}
}
/**
* Sets raw HTTP headers.
*
* @param array $headers
*/
public function setHeaders(array $headers)
{
$this->headers = $headers;
}
public function getHeaders()
{
return $this->headers;
}
public function getAutoext()
{
return $this->autoext;
}
/**
*
* @param type $template The template path
* @param type $autoext If TRUE, the extension will be appended to the
* template path based on the render engine chosen
*/
public function setTemplate($template, $autoext = true)
{
$this->template = $template;
$this->autoext = $autoext;
}
public function getTemplate()
{
return $this->template;
}
public function setVariables(array $variables)
{
$this->variables = $variables;
}
public function getVariables()
{
return $this->variables;
}
public function setConsole($console)
{
$this->console = (bool)$console;
}
public function isConsole()
{
return $this->console;
}
public function captureTo()
{
return $this->captureTo;
}
}