1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (https://nette.org)
5: * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
6: */
7:
8: namespace Nette\Reflection;
9:
10: use Nette;
11: use Nette\Utils\ObjectMixin;
12:
13:
14: /**
15: * Reports information about a extension.
16: */
17: class Extension extends \ReflectionExtension
18: {
19:
20: public function __toString()
21: {
22: return $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 ClassType($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 GlobalFunction($key);
43: }
44: return $res;
45: }
46:
47:
48: /********************* Nette\Object behaviour ****************d*g**/
49:
50:
51: public function __call($name, $args)
52: {
53: return ObjectMixin::call($this, $name, $args);
54: }
55:
56:
57: public function &__get($name)
58: {
59: return ObjectMixin::get($this, $name);
60: }
61:
62:
63: public function __set($name, $value)
64: {
65: ObjectMixin::set($this, $name, $value);
66: }
67:
68:
69: public function __isset($name)
70: {
71: return ObjectMixin::has($this, $name);
72: }
73:
74:
75: public function __unset($name)
76: {
77: ObjectMixin::remove($this, $name);
78: }
79:
80: }
81: