GeneratorConfig
Configuration for code generation.
Tags
Table of Contents
- $options : array<string|int, mixed>
- __construct() : mixed
- Creates a new configuration for code generator.
- getConstantSorting() : bool|Closure|Comparator|string
- Returns the constant sorting.
- getGenerateEmptyDocblock() : bool
- Returns whether empty docblocks are generated.
- getHeaderComment() : null|Docblock
- Returns the file header comment.
- getHeaderDocblock() : Docblock
- Returns the file header docblock.
- getMethodSorting() : bool|Closure|Comparator|string
- Returns the method sorting.
- getPropertySorting() : bool|Closure|Comparator|string
- Returns the property sorting.
- getUseStatementSorting() : bool|Closure|Comparator|string
- Returns the use statement sorting.
- isPhp74Properties() : bool
- Whether to use the Php 7.4 typed properties declaration.
- isSortingEnabled() : bool
- Returns whether sorting is enabled.
- setConstantSorting() : $this
- Returns the constant sorting.
- setGenerateEmptyDocblock() : $this
- Sets whether empty docblocks are generated.
- setHeaderComment() : $this
- Sets the file header comment.
- setHeaderDocblock() : $this
- Sets the file header docblock.
- setMethodSorting() : $this
- Returns the method sorting.
- setPropertySorting() : $this
- Returns the property sorting.
- setSortingEnabled() : $this
- Returns whether sorting is enabled.
- setUseStatementSorting() : $this
- Returns the use statement sorting.
- configureOptions() : void
- toDocblock() : Docblock|null
Properties
$options
protected
array<string|int, mixed>
$options
Methods
__construct()
Creates a new configuration for code generator.
public
__construct([array<string|int, mixed>|null $options = null ]) : mixed
Parameters
- $options : array<string|int, mixed>|null = null
Return values
mixed —getConstantSorting()
Returns the constant sorting.
public
getConstantSorting() : bool|Closure|Comparator|string
Return values
bool|Closure|Comparator|string —getGenerateEmptyDocblock()
Returns whether empty docblocks are generated.
public
getGenerateEmptyDocblock() : bool
Return values
bool —true
if they will be generated and false
if not
getHeaderComment()
Returns the file header comment.
public
getHeaderComment() : null|Docblock
Return values
null|Docblock —the header comment
getHeaderDocblock()
Returns the file header docblock.
public
getHeaderDocblock() : Docblock
Return values
Docblock —the docblock
getMethodSorting()
Returns the method sorting.
public
getMethodSorting() : bool|Closure|Comparator|string
Return values
bool|Closure|Comparator|string —getPropertySorting()
Returns the property sorting.
public
getPropertySorting() : bool|Closure|Comparator|string
Return values
bool|Closure|Comparator|string —getUseStatementSorting()
Returns the use statement sorting.
public
getUseStatementSorting() : bool|Closure|Comparator|string
Return values
bool|Closure|Comparator|string —isPhp74Properties()
Whether to use the Php 7.4 typed properties declaration.
public
isPhp74Properties() : bool
Return values
bool —isSortingEnabled()
Returns whether sorting is enabled.
public
isSortingEnabled() : bool
Return values
bool —true
if it is enabled and false
if not
setConstantSorting()
Returns the constant sorting.
public
setConstantSorting(bool|Closure|Comparator|string $sorting) : $this
Parameters
- $sorting : bool|Closure|Comparator|string
Return values
$this —setGenerateEmptyDocblock()
Sets whether empty docblocks are generated.
public
setGenerateEmptyDocblock(bool $generate) : $this
Parameters
- $generate : bool
-
true
if they will be generated andfalse
if not
Return values
$this —setHeaderComment()
Sets the file header comment.
public
setHeaderComment(string $comment) : $this
Parameters
- $comment : string
-
the header comment
Return values
$this —setHeaderDocblock()
Sets the file header docblock.
public
setHeaderDocblock(Docblock $docblock) : $this
Parameters
- $docblock : Docblock
-
the docblock
Return values
$this —setMethodSorting()
Returns the method sorting.
public
setMethodSorting(bool|Closure|Comparator|string $sorting) : $this
Parameters
- $sorting : bool|Closure|Comparator|string
Return values
$this —setPropertySorting()
Returns the property sorting.
public
setPropertySorting(bool|Closure|Comparator|string $sorting) : $this
Parameters
- $sorting : bool|Closure|Comparator|string
Return values
$this —setSortingEnabled()
Returns whether sorting is enabled.
public
setSortingEnabled( $enabled) : $this
Parameters
Return values
$this —setUseStatementSorting()
Returns the use statement sorting.
public
setUseStatementSorting(bool|Closure|Comparator|string $sorting) : $this
Parameters
- $sorting : bool|Closure|Comparator|string
Return values
$this —configureOptions()
protected
configureOptions(OptionsResolver $resolver) : void
Parameters
- $resolver : OptionsResolver
Return values
void —toDocblock()
private
toDocblock(mixed $value) : Docblock|null
Parameters
- $value : mixed