PHP Class PHPSA\Compiler

Mostrar archivo Open project: ovr/phpsa Class Usage Examples

Protected Properties

Property Type Description
$classes PHPSA\Definition\ClassDefinition[]
$functions PHPSA\Definition\FunctionDefinition[]
$traits PHPSA\Definition\TraitDefinition[]

Public Methods

Method Description
addClass ( ClassDefinition $class )
addFunction ( FunctionDefinition $function )
addTrait ( TraitDefinition $class )
compile ( Context $context )
getFunction ( string $name ) : boolean | FunctionDefinition Try to find function from pre-compiled function(s)
getFunctionNS ( string $name, string | null $namespace = null ) : boolean | FunctionDefinition Try to find function with $namespace from pre-compiled function(s)
getTrait ( string $name ) : TraitDefinition | null

Method Details

addClass() public method

public addClass ( ClassDefinition $class )
$class PHPSA\Definition\ClassDefinition

addFunction() public method

public addFunction ( FunctionDefinition $function )
$function PHPSA\Definition\FunctionDefinition

addTrait() public method

public addTrait ( TraitDefinition $class )
$class PHPSA\Definition\TraitDefinition

compile() public method

public compile ( Context $context )
$context Context

getFunction() public method

Try to find function from pre-compiled function(s)
public getFunction ( string $name ) : boolean | FunctionDefinition
$name string
return boolean | PHPSA\Definition\FunctionDefinition

getFunctionNS() public method

Try to find function with $namespace from pre-compiled function(s)
public getFunctionNS ( string $name, string | null $namespace = null ) : boolean | FunctionDefinition
$name string
$namespace string | null
return boolean | PHPSA\Definition\FunctionDefinition

getTrait() public method

public getTrait ( string $name ) : TraitDefinition | null
$name string
return PHPSA\Definition\TraitDefinition | null

Property Details

$classes protected_oe property

protected ClassDefinition[],PHPSA\Definition $classes
return PHPSA\Definition\ClassDefinition[]

$functions protected_oe property

protected FunctionDefinition[],PHPSA\Definition $functions
return PHPSA\Definition\FunctionDefinition[]

$traits protected_oe property

protected TraitDefinition[],PHPSA\Definition $traits
return PHPSA\Definition\TraitDefinition[]