PHP Class Zend\Code\Generator\TraitUsageGenerator

Inheritance: extends Zend\Code\Generator\AbstractGenerator
Show file Open project: zendframework/zend-code

Protected Properties

Property Type Description
$classGenerator ClassGenerator
$traitAliases Array of trait aliases
$traitOverrides Array of trait overrides
$traits Array of trait names
$uses Array of string names

Public Methods

Method Description
__construct ( ClassGenerator $classGenerator )
addTrait ( $trait )
addTraitAlias ( $method, $alias, $visibility = null )
addTraitOverride ( $method, $traitsToReplace )
addTraits ( array $traits )
addUse ( $use, $useAlias = null )
generate ( )
getTraitAliases ( )
getTraitOverrides ( )
getTraits ( )
getUses ( )
hasTrait ( $traitName )
hasUse ( $use ) : boolean
hasUseAlias ( $use ) : boolean
removeTrait ( $traitName )
removeTraitOverride ( $method, $overridesToRemove = null )
removeUse ( $use ) : TraitUsageGenerator
removeUseAlias ( $use ) : TraitUsageGenerator

Method Details

__construct() public method

public __construct ( ClassGenerator $classGenerator )
$classGenerator ClassGenerator

addTrait() public method

public addTrait ( $trait )

addTraitAlias() public method

public addTraitAlias ( $method, $alias, $visibility = null )

addTraitOverride() public method

public addTraitOverride ( $method, $traitsToReplace )

addTraits() public method

public addTraits ( array $traits )
$traits array

addUse() public method

public addUse ( $use, $useAlias = null )

generate() public method

public generate ( )

getTraitAliases() public method

public getTraitAliases ( )

getTraitOverrides() public method

public getTraitOverrides ( )

getTraits() public method

public getTraits ( )

getUses() public method

public getUses ( )

hasTrait() public method

public hasTrait ( $traitName )

hasUse() public method

public hasUse ( $use ) : boolean
$use
return boolean

hasUseAlias() public method

public hasUseAlias ( $use ) : boolean
$use
return boolean

removeTrait() public method

public removeTrait ( $traitName )

removeTraitOverride() public method

public removeTraitOverride ( $method, $overridesToRemove = null )

removeUse() public method

public removeUse ( $use ) : TraitUsageGenerator
$use
return TraitUsageGenerator

removeUseAlias() public method

public removeUseAlias ( $use ) : TraitUsageGenerator
$use
return TraitUsageGenerator

Property Details

$classGenerator protected property

protected ClassGenerator,Zend\Code\Generator $classGenerator
return ClassGenerator

$traitAliases protected property

Array of trait aliases
protected $traitAliases

$traitOverrides protected property

Array of trait overrides
protected $traitOverrides

$traits protected property

Array of trait names
protected $traits

$uses protected property

Array of string names
protected $uses