FunctionTrait
Function trait
Tags
Table of Contents
Properties
- $arguments : array<string|int, mixed>
- Arguments
- $returnTypes : array<string|int, mixed>
- Return Types
Methods
- addArgument() : static
- Add an argument
- addArguments() : static
- Add arguments
- addParameter() : static
- Add an argument (alias method for convenience)
- addParameters() : static
- Add arguments (alias method for convenience)
- addReturnType() : static
- Add a return type
- addReturnTypes() : static
- Add return types
- getArgument() : array<string|int, mixed>|null
- Get an argument
- getArguments() : array<string|int, mixed>
- Get the arguments
- getParameter() : array<string|int, mixed>|null
- Get an argument (alias method for convenience)
- getParameters() : array<string|int, mixed>
- Get the arguments (alias method for convenience)
- getReturnTypes() : array<string|int, mixed>
- Get the return types
- hasArgument() : bool
- Has an argument
- hasArguments() : bool
- Has arguments
- hasParameter() : bool
- Has an argument (alias method for convenience)
- hasParameters() : bool
- Has arguments (alias method for convenience)
- hasReturnType() : bool
- Has return type
- hasReturnTypes() : bool
- Has return types
- formatArguments() : string|null
- Format the arguments
Properties
$arguments
Arguments
protected
array<string|int, mixed>
$arguments
= []
$returnTypes
Return Types
protected
array<string|int, mixed>
$returnTypes
= []
Methods
addArgument()
Add an argument
public
addArgument(string $name[, mixed $value = null ][, string|null $type = null ]) : static
Parameters
- $name : string
- $value : mixed = null
- $type : string|null = null
Return values
staticaddArguments()
Add arguments
public
addArguments(array<string|int, mixed> $args) : static
Parameters
- $args : array<string|int, mixed>
Tags
Return values
staticaddParameter()
Add an argument (alias method for convenience)
public
addParameter(string $name[, mixed $value = null ][, string|null $type = null ]) : static
Parameters
- $name : string
- $value : mixed = null
- $type : string|null = null
Return values
staticaddParameters()
Add arguments (alias method for convenience)
public
addParameters(array<string|int, mixed> $args) : static
Parameters
- $args : array<string|int, mixed>
Return values
staticaddReturnType()
Add a return type
public
addReturnType(string $type) : static
Parameters
- $type : string
Return values
staticaddReturnTypes()
Add return types
public
addReturnTypes(array<string|int, mixed> $types) : static
Parameters
- $types : array<string|int, mixed>
Return values
staticgetArgument()
Get an argument
public
getArgument(string $name) : array<string|int, mixed>|null
Parameters
- $name : string
Return values
array<string|int, mixed>|nullgetArguments()
Get the arguments
public
getArguments() : array<string|int, mixed>
Return values
array<string|int, mixed>getParameter()
Get an argument (alias method for convenience)
public
getParameter(string $name) : array<string|int, mixed>|null
Parameters
- $name : string
Return values
array<string|int, mixed>|nullgetParameters()
Get the arguments (alias method for convenience)
public
getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>getReturnTypes()
Get the return types
public
getReturnTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>hasArgument()
Has an argument
public
hasArgument(string $name) : bool
Parameters
- $name : string
Return values
boolhasArguments()
Has arguments
public
hasArguments() : bool
Return values
boolhasParameter()
Has an argument (alias method for convenience)
public
hasParameter(string $name) : bool
Parameters
- $name : string
Return values
boolhasParameters()
Has arguments (alias method for convenience)
public
hasParameters() : bool
Return values
boolhasReturnType()
Has return type
public
hasReturnType(string $type) : bool
Parameters
- $type : string
Return values
boolhasReturnTypes()
Has return types
public
hasReturnTypes() : bool
Return values
boolformatArguments()
Format the arguments
protected
formatArguments() : string|null