Documentation

TraitUseAdaptation
in package
implements Builder

Table of Contents

Interfaces

Builder

Constants

TYPE_ALIAS  = 1
TYPE_PRECEDENCE  = 2
TYPE_UNDEFINED  = 0

Properties

$alias  : Identifier|null
$insteadof  : array<string|int, Name>
$method  : Identifier
$modifier  : int|null
$trait  : Name|null
$type  : int

Methods

__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 adapted method private.
makeProtected()  : $this
Sets adapted method protected.
makePublic()  : $this
Sets adapted method public.
setModifier()  : void

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 adapted trait

$method : Identifier|string

Name of adapted method

as()

Sets alias of method.

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

Alias for adapted 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 adapted method private.

public makePrivate() : $this
Return values
$this

The builder instance (for fluid interface)

makeProtected()

Sets adapted method protected.

public makeProtected() : $this
Return values
$this

The builder instance (for fluid interface)

makePublic()

Sets adapted method public.

public makePublic() : $this
Return values
$this

The builder instance (for fluid interface)

setModifier()

protected setModifier(int $modifier) : void
Parameters
$modifier : int

        
On this page

Search results