Documentation

SignatureFormatter
in package
implements Formatter

An abstract representation of a function, class or property signature.

Interfaces, Classes and Traits

Formatter
Formatter interface.

Table of Contents

format()  : string
Format a signature for the given reflector.
formatName()  : string
Print the signature name.
formatClass()  : string
Format a class signature.
formatClassConstant()  : string
Format a constant signature.
formatConstant()  : string
Format a constant signature.
formatFunction()  : string
Format a function signature.
formatFunctionParams()  : array<string|int, mixed>
Print the function params.
formatMethod()  : string
Format a method signature.
formatModifiers()  : string
Print the method, property or class modifiers.
formatProperty()  : string
Format a property signature.
getTypeStyle()  : string
Helper for getting output style for a given value's type.

Methods

format()

Format a signature for the given reflector.

public static format(Reflector $reflector) : string

Defers to subclasses to do the actual formatting.

Parameters
$reflector : Reflector
Return values
string

Formatted signature

formatName()

Print the signature name.

public static formatName(Reflector $reflector) : string
Parameters
$reflector : Reflector
Return values
string

Formatted name

formatClass()

Format a class signature.

private static formatClass(ReflectionClass $reflector) : string
Parameters
$reflector : ReflectionClass
Return values
string

Formatted signature

formatFunction()

Format a function signature.

private static formatFunction(ReflectionFunction $reflector) : string
Parameters
$reflector : ReflectionFunction
Return values
string

Formatted signature

formatFunctionParams()

Print the function params.

private static formatFunctionParams(ReflectionFunctionAbstract $reflector) : array<string|int, mixed>
Parameters
$reflector : ReflectionFunctionAbstract
Return values
array<string|int, mixed>

formatMethod()

Format a method signature.

private static formatMethod(ReflectionMethod $reflector) : string
Parameters
$reflector : ReflectionMethod
Return values
string

Formatted signature

formatModifiers()

Print the method, property or class modifiers.

private static formatModifiers(Reflector $reflector) : string
Parameters
$reflector : Reflector
Return values
string

Formatted modifiers

formatProperty()

Format a property signature.

private static formatProperty(ReflectionProperty $reflector) : string
Parameters
$reflector : ReflectionProperty
Return values
string

Formatted signature

getTypeStyle()

Helper for getting output style for a given value's type.

private static getTypeStyle(mixed $value) : string
Parameters
$value : mixed
Return values
string

Search results