Copied!
CloneableInstantiable
Constants
public PhpParser\Builder\TraitUseAdaptation::TYPE_ALIAS = 1
public PhpParser\Builder\TraitUseAdaptation::TYPE_PRECEDENCE = 2
public PhpParser\Builder\TraitUseAdaptation::TYPE_UNDEFINED = 0
Methods
public __construct( $trait, $method)
 

Creates a trait use adaptation builder.

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

Sets alias of method.

  • param \Node\Identifier|string $alias Alias for adaptated 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 adaptated method private.

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

Sets adaptated method protected.

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

Sets adaptated method public.

  • return $this The builder instance (for fluid interface)
Properties
protected $alias = NULL
protected $insteadof = []
protected $method = NULL
protected $modifier = NULL
protected $trait = NULL
protected $type = NULL
 
  • var int Type of building adaptation
Methods
protected setModifier(int $modifier)
© 2023 Bruce Wells
Search Namespaces \ Classes
Configuration