Documentation

TraitUseAdaptation
in package
implements Builder

Interfaces, Classes, Traits and Enums

Builder

Table of Contents

TYPE_ALIAS  = 1
TYPE_PRECEDENCE  = 2
TYPE_UNDEFINED  = 0
$alias  : mixed
$insteadof  : mixed
$method  : mixed
$modifier  : mixed
$trait  : mixed
$type  : int
__construct()  : mixed
Creates a trait use adaptation builder.
as()  : $this
Sets alias of method.
getNode()  : Node
Returns the built node.
insteadof()  : $this
Adds overwritten traits.
makePrivate()  : $this
Sets adaptated method private.
makeProtected()  : $this
Sets adaptated method protected.
makePublic()  : $this
Sets adaptated method public.
setModifier()  : mixed

Constants

Properties

Methods

__construct()

Creates a trait use adaptation builder.

public __construct(Name|string|null $trait, Identifier|string $method) : mixed
Parameters
$trait : Name|string|null

Name of adaptated trait

$method : Identifier|string

Name of adaptated method

Return values
mixed

as()

Sets alias of method.

public as(Identifier|string $alias) : $this
Parameters
$alias : Identifier|string

Alias for adaptated method

Return values
$this

The builder instance (for fluid interface)

insteadof()

Adds overwritten traits.

public insteadof(Name|string ...$traits) : $this
Parameters
$traits : Name|string

Traits for overwrite

Return values
$this

The builder instance (for fluid interface)

makePrivate()

Sets adaptated method private.

public makePrivate() : $this
Return values
$this

The builder instance (for fluid interface)

makeProtected()

Sets adaptated method protected.

public makeProtected() : $this
Return values
$this

The builder instance (for fluid interface)

makePublic()

Sets adaptated method public.

public makePublic() : $this
Return values
$this

The builder instance (for fluid interface)

setModifier()

protected setModifier(int $modifier) : mixed
Parameters
$modifier : int
Return values
mixed

Search results