Documentation

Property
in package
implements Builder

Interfaces, Classes, Traits and Enums

Builder

Table of Contents

$attributeGroups  : array<string|int, AttributeGroup>
$attributes  : mixed
$default  : mixed
$flags  : mixed
$name  : mixed
$type  : null|Identifier|Name|NullableType
__construct()  : mixed
Creates a property builder.
addAttribute()  : $this
Adds an attribute group.
getNode()  : Property
Returns the built class node.
makePrivate()  : $this
Makes the property private.
makeProtected()  : $this
Makes the property protected.
makePublic()  : $this
Makes the property public.
makeReadonly()  : $this
Makes the property readonly.
makeStatic()  : $this
Makes the property static.
setDefault()  : $this
Sets default value for the property.
setDocComment()  : $this
Sets doc comment for the property.
setType()  : $this
Sets the property type for PHP 7.4+.

Properties

$attributes

protected mixed $attributes = []

$default

protected mixed $default = null

Methods

__construct()

Creates a property builder.

public __construct(string $name) : mixed
Parameters
$name : string

Name of the property

Return values
mixed

makePrivate()

Makes the property private.

public makePrivate() : $this
Return values
$this

The builder instance (for fluid interface)

makeProtected()

Makes the property protected.

public makeProtected() : $this
Return values
$this

The builder instance (for fluid interface)

makePublic()

Makes the property public.

public makePublic() : $this
Return values
$this

The builder instance (for fluid interface)

makeReadonly()

Makes the property readonly.

public makeReadonly() : $this
Return values
$this

The builder instance (for fluid interface)

makeStatic()

Makes the property static.

public makeStatic() : $this
Return values
$this

The builder instance (for fluid interface)

setDefault()

Sets default value for the property.

public setDefault(mixed $value) : $this
Parameters
$value : mixed

Default value to use

Return values
$this

The builder instance (for fluid interface)

setDocComment()

Sets doc comment for the property.

public setDocComment(Doc|string $docComment) : $this
Parameters
$docComment : Doc|string

Doc comment to set

Return values
$this

The builder instance (for fluid interface)

Search results