1: <?php
2:
3: 4: 5: 6:
7:
8: namespace Nette\Reflection;
9:
10: use Nette;
11: use Nette\ObjectMixin;
12:
13:
14: 15: 16: 17: 18:
19: class Extension extends \ReflectionExtension
20: {
21:
22: public function __toString()
23: {
24: return $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: trigger_error(__METHOD__ . '() is deprecated.', E_USER_DEPRECATED);
59: return new ClassType(get_called_class());
60: }
61:
62:
63: public function __call($name, $args)
64: {
65: return ObjectMixin::call($this, $name, $args);
66: }
67:
68:
69: public function &__get($name)
70: {
71: return ObjectMixin::get($this, $name);
72: }
73:
74:
75: public function __set($name, $value)
76: {
77: ObjectMixin::set($this, $name, $value);
78: }
79:
80:
81: public function __isset($name)
82: {
83: return ObjectMixin::has($this, $name);
84: }
85:
86:
87: public function __unset($name)
88: {
89: ObjectMixin::remove($this, $name);
90: }
91:
92: }
93: