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:
12:
13: /**
14: * Reports information about a extension.
15: */
16: class Extension extends \ReflectionExtension
17: {
18: use Nette\SmartObject;
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 = [];
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: