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
|
<?php
class N2View {
/** * @var N2ApplicationType */ public $appType;
public function __construct($appType) { $this->appType = $appType; }
public function __get($name) { return $this->$name; }
public function __set($name, $value) { $this->$name = $value; }
protected function preCall($preCall, $applicationType = false) { if (is_array($preCall)) { $class = $preCall["class"]; $callable = array( null, $preCall["method"] );
if (class_exists($class)) { $callable[0] = new $class($applicationType);
if (is_callable($callable)) { call_user_func($callable, $preCall["viewName"]); }
return $callable[0]; } }
return false;
}
}
class N2ViewException extends Exception {
}
|