49
49
*/
50
50
class FileReflector extends ReflectionAbstract implements PHPParser_NodeVisitor
51
51
{
52
+ /** @var string An MD5 hashed representation of the contents of this file */
52
53
protected $ hash ;
53
- protected $ contents = 1 ;
54
- /**
55
- * @var IncludeReflector[]
56
- */
54
+
55
+ /** @var string The contents of this file. */
56
+ protected $ contents = '' ;
57
+
58
+ /** @var IncludeReflector[] */
57
59
protected $ includes = array ();
58
- /**
59
- * @var ConstantReflector[]
60
- */
60
+
61
+ /** @var ConstantReflector[] */
61
62
protected $ constants = array ();
62
- /**
63
- * @var ClassReflector[]
64
- */
63
+
64
+ /** @var ClassReflector[] */
65
65
protected $ classes = array ();
66
- /**
67
- * @var TraitReflector[]
68
- */
66
+
67
+ /** @var TraitReflector[] */
69
68
protected $ traits = array ();
70
- /**
71
- * @var InterfaceReflector[]
72
- */
69
+
70
+ /** @var InterfaceReflector[] */
73
71
protected $ interfaces = array ();
74
- /**
75
- * @var FunctionReflector[]
76
- */
72
+
73
+ /** @var FunctionReflector[] */
77
74
protected $ functions = array ();
75
+
76
+ /** @var string The name of the file associated with this reflection object. */
78
77
protected $ filename = '' ;
78
+
79
+ /** @var DocBlock */
79
80
protected $ doc_block ;
81
+
82
+ /** @var string The package name that should be used if none is present in the file */
80
83
protected $ default_package_name = 'Default ' ;
81
84
82
85
/** @var string[] A list of markers contained in this file. */
@@ -88,8 +91,8 @@ class FileReflector extends ReflectionAbstract implements PHPParser_NodeVisitor
88
91
/** @var string[] A list of all marker types to search for in this file. */
89
92
protected $ marker_terms = array ('TODO ' , 'FIXME ' );
90
93
91
- protected $ namespace_aliases = array ();
92
- protected $ current_namespace = '' ;
94
+ /** @var Context */
95
+ protected $ context ;
93
96
94
97
/**
95
98
* Opens the file and retrieves its contents.
@@ -453,12 +456,12 @@ public function getParseErrors()
453
456
454
457
public function getNamespace ()
455
458
{
456
- return $ this ->current_namespace ;
459
+ return $ this ->context -> getNamespace () ;
457
460
}
458
461
459
462
public function getNamespaceAliases ()
460
463
{
461
- return $ this ->namespace_aliases ;
464
+ return $ this ->context -> getNamespaceAliases () ;
462
465
}
463
466
464
467
public function getContents ()
0 commit comments