AbstractGenerator
in package
implements
GeneratorInterface
AbstractYes
Table of Contents
Interfaces
Constants
- LINE_FEED = "\n"
- Line feed to use in place of EOL
Properties
- $indentation : string
- $isSourceDirty : bool
- $sourceContent : string|null
- TODO: Type should be changed to "string" in the next major version. Nullable for BC
Methods
- __construct() : mixed
- getIndentation() : string
- getSourceContent() : string|null
- isSourceDirty() : bool
- setIndentation() : AbstractGenerator
- setOptions() : AbstractGenerator
- setSourceContent() : AbstractGenerator
- setSourceDirty() : AbstractGenerator
Constants
LINE_FEED
Line feed to use in place of EOL
public
mixed
LINE_FEED
= "\n"
Properties
$indentation
protected
string
$indentation
= ' '
4 spaces by default
$isSourceDirty
protected
bool
$isSourceDirty
= true
$sourceContent
TODO: Type should be changed to "string" in the next major version. Nullable for BC
protected
string|null
$sourceContent
= null
Methods
__construct()
public
__construct([array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $options : array<string|int, mixed> = []
getIndentation()
public
getIndentation() : string
Return values
stringgetSourceContent()
public
getSourceContent() : string|null
Return values
string|nullisSourceDirty()
public
isSourceDirty() : bool
Return values
boolsetIndentation()
public
setIndentation(string $indentation) : AbstractGenerator
Parameters
- $indentation : string
Return values
AbstractGeneratorsetOptions()
public
setOptions(array<string|int, mixed>|Traversable $options) : AbstractGenerator
Parameters
- $options : array<string|int, mixed>|Traversable
Tags
Return values
AbstractGeneratorsetSourceContent()
public
setSourceContent(string|null $sourceContent) : AbstractGenerator
Parameters
- $sourceContent : string|null
Return values
AbstractGeneratorsetSourceDirty()
public
setSourceDirty([bool $isSourceDirty = true ]) : AbstractGenerator
Parameters
- $isSourceDirty : bool = true