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