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 ExtensionReflection 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 ClassReflection($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 FunctionReflection($key);
43: }
44: return $res;
45: }
46:
47:
48: /********************* Object behaviour ****************d*g**/
49:
50:
51: /**
52: * @return ClassReflection
53: */
54: public function getReflection()
55: {
56: return new ClassReflection($this);
57: }
58:
59:
60: public function __call($name, $args)
61: {
62: return ObjectMixin::call($this, $name, $args);
63: }
64:
65:
66: public function &__get($name)
67: {
68: return ObjectMixin::get($this, $name);
69: }
70:
71:
72: public function __set($name, $value)
73: {
74: ObjectMixin::set($this, $name, $value);
75: }
76:
77:
78: public function __isset($name)
79: {
80: return ObjectMixin::has($this, $name);
81: }
82:
83:
84: public function __unset($name)
85: {
86: ObjectMixin::remove($this, $name);
87: }
88:
89: }
90: