1: <?php
2: /**
3: * PHP Token Reflection
4: *
5: * Version 1.3.1
6: *
7: * LICENSE
8: *
9: * This source file is subject to the new BSD license that is bundled
10: * with this library in the file LICENSE.
11: *
12: * @author Ondřej Nešpor
13: * @author Jaroslav Hanslík
14: */
15:
16: namespace TokenReflection;
17:
18: /**
19: * Common reflection namespace interface.
20: */
21: interface IReflectionNamespace extends IReflection
22: {
23: /**
24: * Returns if the namespace contains a class of the given name.
25: *
26: * @param string $className Class name
27: * @return boolean
28: */
29: public function hasClass($className);
30:
31: /**
32: * Return a class reflection.
33: *
34: * @param string $className Class name
35: * @return \TokenReflection\IReflectionClass
36: */
37: public function getClass($className);
38:
39: /**
40: * Returns class reflections.
41: *
42: * @return array
43: */
44: public function getClasses();
45:
46: /**
47: * Returns class names (FQN).
48: *
49: * @return array
50: */
51: public function getClassNames();
52:
53: /**
54: * Returns class unqualified names (UQN).
55: *
56: * @return array
57: */
58: public function getClassShortNames();
59:
60: /**
61: * Returns if the namespace contains a constant of the given name.
62: *
63: * @param string $constantName Constant name
64: * @return boolean
65: */
66: public function hasConstant($constantName);
67:
68: /**
69: * Returns a constant reflection.
70: *
71: * @param string $constantName Constant name
72: * @return \TokenReflection\IReflectionConstant
73: */
74: public function getConstant($constantName);
75:
76: /**
77: * Returns constant reflections.
78: *
79: * @return array
80: */
81: public function getConstants();
82:
83: /**
84: * Returns constant names (FQN).
85: *
86: * @return array
87: */
88: public function getConstantNames();
89:
90: /**
91: * Returns constant unqualified names (UQN).
92: *
93: * @return array
94: */
95: public function getConstantShortNames();
96:
97: /**
98: * Returns if the namespace contains a function of the given name.
99: *
100: * @param string $functionName Function name
101: * @return boolean
102: */
103: public function hasFunction($functionName);
104:
105: /**
106: * Returns a function reflection.
107: *
108: * @param string $functionName Function name
109: * @return \TokenReflection\IReflectionFunction
110: */
111: public function getFunction($functionName);
112:
113: /**
114: * Returns function reflections.
115: *
116: * @return array
117: */
118: public function getFunctions();
119:
120: /**
121: * Returns function names (FQN).
122: *
123: * @return array
124: */
125: public function getFunctionNames();
126:
127: /**
128: * Returns function unqualified names (UQN).
129: *
130: * @return array
131: */
132: public function getFunctionShortNames();
133:
134: /**
135: * Returns the string representation of the reflection object.
136: *
137: * @return string
138: */
139: public function __toString();
140: }
141: