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