ConstructorPromotion
in package
Table of Contents
Constants
- DEFAULT_VALUE = 'default'
Properties
- $name : string
- Summary
- $email : Email
- $birth_date : DateTimeImmutable
- $created_at : DateTimeImmutable
- $uses_constants : array<string|int, mixed>
Methods
- __construct() : mixed
- Constructor with promoted properties
Constants
DEFAULT_VALUE
private
mixed
DEFAULT_VALUE
= 'default'
Properties
$name
Summary
public
string
$name
= 'default name'
Description
property description
protected
Email
$email
= new Email()
$birth_date
private
DateTimeImmutable
$birth_date
$created_at
private
DateTimeImmutable
$created_at
= new DateTimeImmutable('now')
$uses_constants
private
array<string|int, mixed>
$uses_constants
= [self::DEFAULT_VALUE]
Methods
__construct()
Constructor with promoted properties
public
__construct([string $name = 'default name' ][, Email $email = new Email() ], DateTimeImmutable $birth_date[, DateTimeImmutable $created_at = new DateTimeImmutable('now') ][, array<string|int, mixed> $uses_constants = [self::DEFAULT_VALUE] ]) : mixed
Parameters
- $name : string = 'default name'
-
my docblock name
- $email : Email = new Email()
- $birth_date : DateTimeImmutable
- $created_at : DateTimeImmutable = new DateTimeImmutable('now')
- $uses_constants : array<string|int, mixed> = [self::DEFAULT_VALUE]