1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (http://nette.org)
5: *
6: * Copyright (c) 2004, 2011 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: */
20: class NExtensionReflection extends ReflectionExtension
21: {
22:
23: public function __toString()
24: {
25: return 'Extension ' . $this->getName();
26: }
27:
28:
29:
30: /********************* Reflection layer ****************d*g**/
31:
32:
33:
34: public function getClasses()
35: {
36: $res = array();
37: foreach (parent::getClassNames() as $val) {
38: $res[$val] = new NClassReflection($val);
39: }
40: return $res;
41: }
42:
43:
44:
45: public function getFunctions()
46: {
47: foreach ($res = parent::getFunctions() as $key => $val) {
48: $res[$key] = new NFunctionReflection($key);
49: }
50: return $res;
51: }
52:
53:
54:
55: /********************* NObject behaviour ****************d*g**/
56:
57:
58:
59: /**
60: * @return NClassReflection
61: */
62: public function getReflection()
63: {
64: return new NClassReflection($this);
65: }
66:
67:
68:
69: public function __call($name, $args)
70: {
71: return NObjectMixin::call($this, $name, $args);
72: }
73:
74:
75:
76: public function &__get($name)
77: {
78: return NObjectMixin::get($this, $name);
79: }
80:
81:
82:
83: public function __set($name, $value)
84: {
85: return NObjectMixin::set($this, $name, $value);
86: }
87:
88:
89:
90: public function __isset($name)
91: {
92: return NObjectMixin::has($this, $name);
93: }
94:
95:
96:
97: public function __unset($name)
98: {
99: NObjectMixin::remove($this, $name);
100: }
101:
102: }
103: