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: */
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: * @author David Grudl
18: */
19: class Extension extends \ReflectionExtension
20: {
21:
22: public function __toString()
23: {
24: return $this->getName();
25: }
26:
27:
28: /********************* Reflection layer ****************d*g**/
29:
30:
31: public function getClasses()
32: {
33: $res = array();
34: foreach (parent::getClassNames() as $val) {
35: $res[$val] = new ClassType($val);
36: }
37: return $res;
38: }
39:
40:
41: public function getFunctions()
42: {
43: foreach ($res = parent::getFunctions() as $key => $val) {
44: $res[$key] = new GlobalFunction($key);
45: }
46: return $res;
47: }
48:
49:
50: /********************* Nette\Object behaviour ****************d*g**/
51:
52:
53: public function __call($name, $args)
54: {
55: return ObjectMixin::call($this, $name, $args);
56: }
57:
58:
59: public function &__get($name)
60: {
61: return ObjectMixin::get($this, $name);
62: }
63:
64:
65: public function __set($name, $value)
66: {
67: ObjectMixin::set($this, $name, $value);
68: }
69:
70:
71: public function __isset($name)
72: {
73: return ObjectMixin::has($this, $name);
74: }
75:
76:
77: public function __unset($name)
78: {
79: ObjectMixin::remove($this, $name);
80: }
81:
82: }
83: