mediatekformation

FileReflection
in package
implements ReflectionInterface

Interfaces, Classes, Traits and Enums

ReflectionInterface

Table of Contents

$classes  : array<string|int, ClassReflection>
$contents  : string
$docComment  : string
$endLine  : int
$filePath  : string
$functions  : array<string|int, FunctionReflection>
$namespaces  : array<string|int, string>
$requiredFiles  : array<string|int, string>
$startLine  : int
$uses  : array<string|int, string>
__construct()  : mixed
__toString()  : string
Serialize to string
export()  : void
Required by the Reflector interface.
getClass()  : ClassReflection
Retrieve the reflection class of a given class found in this file
getClasses()  : array<string|int, ClassReflection>
Return the reflection classes of the classes found inside this file
getContents()  : string
Return the full contents of file
getDocBlock()  : DocBlockReflection|false
getDocComment()  : string
getEndLine()  : int
Get the end line / number of lines
getFileName()  : string
Return the file name of the reflected file
getFunctions()  : array<string|int, FunctionReflection>
Return the reflection functions of the functions found inside this file
getNamespace()  : null|string
getNamespaces()  : array<string|int, string>
getStartLine()  : int
Get the start line - Always 1, staying consistent with the Reflection API
getUses()  : array<string|int, mixed>
toString()  : string
checkFileDocBlock()  : void
Validate / check a file level DocBlock
reflect()  : void
This method does the work of "reflecting" the file

Properties

$namespaces

protected array<string|int, string> $namespaces = []

$requiredFiles

protected array<string|int, string> $requiredFiles = []

Methods

__construct()

public __construct(string $filename[, bool $includeIfNotAlreadyIncluded = false ]) : mixed
Parameters
$filename : string
$includeIfNotAlreadyIncluded : bool = false
Tags
throws
InvalidArgumentException

If file does not exists

throws
RuntimeException

If file exists but is not included or required

Return values
mixed

__toString()

Serialize to string

public __toString() : string

Required by the Reflector interface

Tags
todo

What should this serialization look like?

Return values
string

export()

Required by the Reflector interface.

public static export() : void
Tags
todo

What should this do?

Return values
void

getContents()

Return the full contents of file

public getContents() : string
Return values
string

getDocComment()

public getDocComment() : string
Return values
string

getEndLine()

Get the end line / number of lines

public getEndLine() : int
Return values
int

getFileName()

Return the file name of the reflected file

public getFileName() : string
Return values
string

getNamespace()

public getNamespace() : null|string
Return values
null|string

getNamespaces()

public getNamespaces() : array<string|int, string>
Return values
array<string|int, string>

getStartLine()

Get the start line - Always 1, staying consistent with the Reflection API

public getStartLine() : int
Return values
int

getUses()

public getUses() : array<string|int, mixed>
Return values
array<string|int, mixed>

checkFileDocBlock()

Validate / check a file level DocBlock

protected checkFileDocBlock(array<string|int, mixed> $tokens) : void
Parameters
$tokens : array<string|int, mixed>

Array of tokenizer tokens

Return values
void

reflect()

This method does the work of "reflecting" the file

protected reflect() : void

Uses Laminas\Code\Scanner\FileScanner to gather file information

Return values
void

Search results