ReflectionFile
class ReflectionFile (View source)
PHP source file informations
Provide informations about global constants, free functions, interfaces, traits and classes defined in the file.
Constants
| SAFE |
ReflectionFile inspection flag The file content can be safely evaluated. |
| AUTOLOADABLE |
ReflectionFile inspection flag Allow use of PHP autoloading system |
| LOADED |
ReflectionFile inspection flag The target file is already loaded through require(), include() or autoloading mechanism. |
| LOOKUP_GLOBAL |
Global lookup option. class_exists () will be used to check if the class exists.
|
| LOOKUP_NAMESPACES |
List of namespaces to search the class into. Namespaces MUST be part of the file namespaces.
|
| PATTERN_IDENTIFIER |
|
Methods
No description
No description
Get the names of namespaces declared in the PHP file
No description
Get a map of all file-space "use" statements
Get the constants defined in the file.
List of constant names defined in the file.
No description
No description
No description
No description
No description
No description
Get interface names defined in this file
No description
No description
List of interface names defined in the file.
Get trait names defined in this file
No description
No description
List of trait names defined in file.
List of classes defined in the file.
No description
No description
List of class names defined in the file
Get all interfaces, traits and classes
Get all interface, trait and class names defined in the file.
Indicates
Get interface, trait or class of the given name
Get the kind of composite element
Get the qualified name of a class, interface or trait declared or used in this file.
Get the fully qualified name of a class, interface or trait declared or used in this file.
Details
at line 63
__construct($filenameOrReflectionClass, $flags = 0)
at line 88
string
getFilename()
at line 98
string[]
getNamespaces()
Get the names of namespaces declared in the PHP file
at line 109
boolean
hasNamespace(string $name)
at line 120
string[]
getUseStatements()
Get a map of all file-space "use" statements
at line 132
ReflectionConstant[]
getConstants()
Get the constants defined in the file.
otherwise, return an associative array where values are the constant values
at line 143
string[]
getConstantNames()
List of constant names defined in the file.
at line 154
boolean
hasConstant(string $name)
at line 166
ReflectionConstant|mixed
getConstant(string $name)
at line 182
ReflectionConstant
getStructureConstant(string $structureName, string $name)
at line 208
ReflectionFunction[]
getFunctions()
at line 219
boolean
hasFunction(string $name)
at line 231
ReflectionFunction
getFunction(string $name)
at line 247
ReflectionClass[]|string[].
getInterfaces()
Get interface names defined in this file
at line 258
boolean
hasInterface(string $name)
at line 271
ReflectionClass
getInterface(string $name)
at line 287
string[]
getInterfaceNames()
List of interface names defined in the file.
at line 298
ReflectionClass[]|string[].
getTraits()
Get trait names defined in this file
at line 309
boolean
hasTrait(string $name)
at line 322
ReflectionClass|mixed|array|ArrayAccess|ContainerInterface|Traversable
getTrait(string $name)
at line 338
string[]
getTraitNames()
List of trait names defined in file.
at line 351
ReflectionClass[]|string[].
getClasses()
List of classes defined in the file.
Key are the class names.
at line 362
boolean
hasClass(string $name)
at line 375
ReflectionClass
getClass($name, $metadata = false)
at line 394
string[]
getClassNames()
List of class names defined in the file
at line 404
ReflectionClass[]
getStructures()
Get all interfaces, traits and classes
at line 415
string[]
getStructureNames()
Get all interface, trait and class names defined in the file.
at line 429
boolean
hasStructure(unknown $name)
Indicates
at line 444
ReflectionClass
getStructure(string $name)
Get interface, trait or class of the given name
at line 476
integer|boolean
getStructureType(unknown $name)
Get the kind of composite element
at line 546
string
getQualifiedName(string $name, array|string|NULL $types = null, array $options = [])
Get the qualified name of a class, interface or trait declared or used in this file.
at line 616
string
getFullyQualifiedName(string $name, array|string|NULL $types = null, array $options = array())
Get the fully qualified name of a class, interface or trait declared or used in this file.