1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (http://nette.org)
5: *
6: * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
7: *
8: * For the full copyright and license information, please view
9: * the file license.txt that was distributed with this source code.
10: * @package Nette\Reflection
11: */
12:
13:
14:
15: /**
16: * Reports information about a extension.
17: *
18: * @author David Grudl
19: * @package Nette\Reflection
20: */
21: class ExtensionReflection extends ReflectionExtension
22: {
23:
24: public function __toString()
25: {
26: return 'Extension ' . $this->getName();
27: }
28:
29:
30:
31: /********************* Reflection layer ****************d*g**/
32:
33:
34:
35: public function getClasses()
36: {
37: $res = array();
38: foreach (parent::getClassNames() as $val) {
39: $res[$val] = new ClassReflection($val);
40: }
41: return $res;
42: }
43:
44:
45:
46: public function getFunctions()
47: {
48: foreach ($res = parent::getFunctions() as $key => $val) {
49: $res[$key] = new FunctionReflection($key);
50: }
51: return $res;
52: }
53:
54:
55:
56: /********************* Object behaviour ****************d*g**/
57:
58:
59:
60: /**
61: * @return ClassReflection
62: */
63: public function getReflection()
64: {
65: return new ClassReflection($this);
66: }
67:
68:
69:
70: public function __call($name, $args)
71: {
72: return ObjectMixin::call($this, $name, $args);
73: }
74:
75:
76:
77: public function &__get($name)
78: {
79: return ObjectMixin::get($this, $name);
80: }
81:
82:
83:
84: public function __set($name, $value)
85: {
86: return ObjectMixin::set($this, $name, $value);
87: }
88:
89:
90:
91: public function __isset($name)
92: {
93: return ObjectMixin::has($this, $name);
94: }
95:
96:
97:
98: public function __unset($name)
99: {
100: ObjectMixin::remove($this, $name);
101: }
102:
103: }
104: