Copied!
CloneableInstantiable
Methods
public __construct( $trait, $method)
 

Creates a trait use adaptation builder.

  • param \Node\Name|string|null $trait Name of adapted trait
  • param \Node\Identifier|string $method Name of adapted method
public as( $alias)
 

Sets alias of method.

  • param \Node\Identifier|string $alias Alias for adapted method
  • return $this The builder instance (for fluid interface)
public getNode() : PhpParser\Node
 

Returns the built node.

  • return \Node The built node
public insteadof( $traits)
 

Adds overwritten traits.

  • param \Node\Name|string $traits Traits for overwrite
  • return $this The builder instance (for fluid interface)
public makePrivate()
 

Sets adapted method private.

  • return $this The builder instance (for fluid interface)
public makeProtected()
 

Sets adapted method protected.

  • return $this The builder instance (for fluid interface)
public makePublic()
 

Sets adapted method public.

  • return $this The builder instance (for fluid interface)
Properties
protected ?PhpParser\Node\Identifier $alias = NULL
protected array $insteadof = []
 
  • var \Node\Name[]
protected PhpParser\Node\Identifier $method
protected ?int $modifier = NULL
protected ?PhpParser\Node\Name $trait
protected int $type
Methods
protected setModifier(int $modifier) : void
Constants
private PhpParser\Builder\TraitUseAdaptation::TYPE_ALIAS = 1
private PhpParser\Builder\TraitUseAdaptation::TYPE_PRECEDENCE = 2
private PhpParser\Builder\TraitUseAdaptation::TYPE_UNDEFINED = 0
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration