Class TraitUsageGenerator

Summary

Fully Qualified Name: Laminas\Code\Generator\TraitUsageGenerator
Extends: AbstractGenerator
Implements: TraitUsageInterface

Description

Methods

Name Description Defined By
__construct() TraitUsageGenerator
addTrait() TraitUsageGenerator
addTraitAlias() TraitUsageGenerator
addTraitOverride() TraitUsageGenerator
addTraits() TraitUsageGenerator
addUse() TraitUsageGenerator
generate() TraitUsageGenerator
getIndentation() AbstractGenerator
getSourceContent() AbstractGenerator
getTraitAliases() TraitUsageGenerator
getTraitOverrides() TraitUsageGenerator
getTraits() TraitUsageGenerator
getUseAlias() Returns the alias of the provided FQCN TraitUsageGenerator
getUses() TraitUsageGenerator
hasTrait() TraitUsageGenerator
hasUse() TraitUsageGenerator
hasUseAlias() TraitUsageGenerator
isSourceDirty() AbstractGenerator
isUseAlias() Returns true if the alias is defined in the use list TraitUsageGenerator
removeTrait() TraitUsageGenerator
removeTraitOverride() TraitUsageGenerator
removeUse() TraitUsageGenerator
removeUseAlias() TraitUsageGenerator
setIndentation() AbstractGenerator
setOptions() AbstractGenerator
setSourceContent() AbstractGenerator
setSourceDirty() AbstractGenerator

Method Details

__construct()

Parameter Name Type Description
$classGenerator

Returns: void

addTrait()

Parameter Name Type Description
$trait

Returns:

addTraitAlias()

Parameter Name Type Description
$method
$alias
$visibility

Returns:

addTraitOverride()

Parameter Name Type Description
$method
$traitsToReplace

Returns:

addTraits()

Parameter Name Type Description
$traits

Returns:

addUse()

Parameter Name Type Description
$use
$useAlias

Returns:

generate()

Returns:

getIndentation()

Returns: string

getSourceContent()

Returns: string

getTraitAliases()

Returns:

getTraitOverrides()

Returns:

getTraits()

Returns:

getUseAlias()

Returns the alias of the provided FQCN

Parameter Name Type Description
$use string

Returns: string|null

getUses()

Returns:

hasTrait()

Parameter Name Type Description
$traitName

Returns:

hasUse()

Parameter Name Type Description
$use string

Returns: bool

hasUseAlias()

Parameter Name Type Description
$use string

Returns: bool

isSourceDirty()

Returns: bool

isUseAlias()

Returns true if the alias is defined in the use list

Parameter Name Type Description
$alias string

Returns: bool

removeTrait()

Parameter Name Type Description
$traitName

Returns:

removeTraitOverride()

Parameter Name Type Description
$method
$overridesToRemove

Returns:

removeUse()

Parameter Name Type Description
$use string

Returns: \TraitUsageGenerator

removeUseAlias()

Parameter Name Type Description
$use string

Returns: \TraitUsageGenerator

setIndentation()

Parameter Name Type Description
$indentation string

Returns: \AbstractGenerator

setOptions()

Parameter Name Type Description
$options array|\Traversable

Returns: \AbstractGenerator

setSourceContent()

Parameter Name Type Description
$sourceContent string

Returns: \AbstractGenerator

setSourceDirty()

Parameter Name Type Description
$isSourceDirty bool

Returns: \AbstractGenerator

Top