1: <?php
2:
3: 4: 5: 6:
7:
8: namespace Nette\Reflection;
9:
10: use Nette,
11: Nette\ObjectMixin;
12:
13:
14: 15: 16: 17: 18:
19: class Extension extends \ReflectionExtension
20: {
21:
22: public function __toString()
23: {
24: return 'Extension ' . $this->getName();
25: }
26:
27:
28:
29:
30:
31: public function getClasses()
32: {
33: $res = array();
34: foreach (parent::getClassNames() as $val) {
35: $res[$val] = new ClassType($val);
36: }
37: return $res;
38: }
39:
40:
41: public function getFunctions()
42: {
43: foreach ($res = parent::getFunctions() as $key => $val) {
44: $res[$key] = new GlobalFunction($key);
45: }
46: return $res;
47: }
48:
49:
50:
51:
52:
53: 54: 55:
56: public static function getReflection()
57: {
58: return new ClassType(get_called_class());
59: }
60:
61:
62: public function __call($name, $args)
63: {
64: return ObjectMixin::call($this, $name, $args);
65: }
66:
67:
68: public function &__get($name)
69: {
70: return ObjectMixin::get($this, $name);
71: }
72:
73:
74: public function __set($name, $value)
75: {
76: ObjectMixin::set($this, $name, $value);
77: }
78:
79:
80: public function __isset($name)
81: {
82: return ObjectMixin::has($this, $name);
83: }
84:
85:
86: public function __unset($name)
87: {
88: ObjectMixin::remove($this, $name);
89: }
90:
91: }
92: