PHP Class PHPSA\Definition\TraitDefinition

Inheritance: extends ParentDefinition
Show file Open project: ovr/phpsa Class Usage Examples

Protected Properties

Property Type Description
$filepath string
$methods ClassMethod[]
$statement PhpParser\Node\Stmt\Trait_

Public Methods

Method Description
__construct ( string $name, Trait_ $statement )
addMethod ( ClassMethod $method )
compile ( Context $context ) : boolean Compile the definition
getFilepath ( ) : string
getMethods ( ) : ClassMethod[]
precompile ( ) : boolean
setFilepath ( string $filepath )

Method Details

__construct() public method

public __construct ( string $name, Trait_ $statement )
$name string
$statement PhpParser\Node\Stmt\Trait_

addMethod() public method

public addMethod ( ClassMethod $method )
$method ClassMethod

compile() public method

Compile the definition
public compile ( Context $context ) : boolean
$context PHPSA\Context
return boolean

getFilepath() public method

public getFilepath ( ) : string
return string

getMethods() public method

public getMethods ( ) : ClassMethod[]
return ClassMethod[]

precompile() public method

public precompile ( ) : boolean
return boolean

setFilepath() public method

public setFilepath ( string $filepath )
$filepath string

Property Details

$filepath protected property

protected string $filepath
return string

$methods protected property

protected ClassMethod[],PHPSA\Definition $methods
return ClassMethod[]

$statement protected property

protected Trait_,PhpParser\Node\Stmt $statement
return PhpParser\Node\Stmt\Trait_