DtosBuilder
extends Builder
in package
This is the builder to dinamically create DTOs.
Tags
Table of Contents
$class | : string | |
---|---|---|
$data | : array<string|int, mixed> | |
__call() | Triggered when invoking "property methods" on the extended builders | : mixed |
__construct() | Elements constructor. | : mixed |
build() | Returns the created DTO. | : Element |
getMainClass() | : string | |
validBuildClass() | : bool |
Properties
$class
protected
string
$class
$data
protected
array<string|int, mixed>
$data
= []
Methods
__call()
Triggered when invoking "property methods" on the extended builders
public
__call(string $name, array<string|int, mixed> $varargs) : mixed
Parameters
- $name : string
-
The name of the triggered method.
- $varargs : array<string|int, mixed>
-
The arguments used on the method. Only one per method accepted.
Tags
Return values
mixed —__construct()
Elements constructor.
public
__construct(string $class) : mixed
Parameters
- $class : string
-
The class we want to build with this builder.
Tags
Return values
mixed —build()
Returns the created DTO.
public
build() : Element
Return values
Element —getMainClass()
protected
getMainClass() : string
Return values
string —validBuildClass()
protected
validBuildClass(string $class) : bool
Parameters
- $class : string