PHP Class gossi\codegen\config\CodeGeneratorConfig

Author: Thomas Gossmann
Datei anzeigen Open project: gossi/php-code-generator Class Usage Examples

Protected Properties

Property Type Description
$options

Public Methods

Method Description
__construct ( array $options = [] ) Creates a new configuration for code generator
getConstantSorting ( ) : string | boolean | phootwork\lang\Comparator | Closure Returns the constant sorting
getGenerateDocblock ( ) : boolean Returns whether docblocks should be generated
getGenerateEmptyDocblock ( ) : boolean Returns whether empty docblocks are generated
getGenerateReturnTypeHints ( ) : boolean Returns whether return type hints will be generated for method parameters (PHP 7)
getGenerateScalarTypeHints ( ) : boolean Returns whether scalar type hints will be generated for method parameters (PHP 7)
getMethodSorting ( ) : string | boolean | phootwork\lang\Comparator | Closure Returns the method sorting
getPropertySorting ( ) : string | boolean | phootwork\lang\Comparator | Closure Returns the property sorting
getUseStatementSorting ( ) : string | boolean | phootwork\lang\Comparator | Closure Returns the use statement sorting
isSortingEnabled ( ) : boolean Returns whether sorting is enabled
setConstantSorting ( $sorting ) Returns the constant sorting
setGenerateDocblock ( boolean $generate ) Sets whether docblocks should be generated
setGenerateEmptyDocblock ( boolean $generate ) Sets whether empty docblocks are generated
setGenerateReturnTypeHints ( boolean $generate ) Sets whether return type hints will be generated for method parameters (PHP 7)
setGenerateScalarTypeHints ( boolean $generate ) Sets whether scalar type hints will be generated for method parameters (PHP 7)
setMethodSorting ( $sorting ) Returns the method sorting
setPropertySorting ( $sorting ) Returns the property sorting
setSortingEnabled ( $enabled ) Returns whether sorting is enabled
setUseStatementSorting ( $sorting ) Returns the use statement sorting

Protected Methods

Method Description
configureOptions ( Symfony\Component\OptionsResolver\OptionsResolver $resolver )

Method Details

__construct() public method

Creates a new configuration for code generator
See also: https://php-code-generator.readthedocs.org/en/latest/generator.html
public __construct ( array $options = [] )
$options array

configureOptions() protected method

protected configureOptions ( Symfony\Component\OptionsResolver\OptionsResolver $resolver )
$resolver Symfony\Component\OptionsResolver\OptionsResolver

getConstantSorting() public method

Returns the constant sorting
public getConstantSorting ( ) : string | boolean | phootwork\lang\Comparator | Closure
return string | boolean | phootwork\lang\Comparator | Closure

getGenerateDocblock() public method

Returns whether docblocks should be generated
public getGenerateDocblock ( ) : boolean
return boolean `true` if they will be generated and `false` if not

getGenerateEmptyDocblock() public method

Returns whether empty docblocks are generated
public getGenerateEmptyDocblock ( ) : boolean
return boolean `true` if they will be generated and `false` if not

getGenerateReturnTypeHints() public method

Returns whether return type hints will be generated for method parameters (PHP 7)
public getGenerateReturnTypeHints ( ) : boolean
return boolean `true` if they will be generated and `false` if not

getGenerateScalarTypeHints() public method

Returns whether scalar type hints will be generated for method parameters (PHP 7)
public getGenerateScalarTypeHints ( ) : boolean
return boolean `true` if they will be generated and `false` if not

getMethodSorting() public method

Returns the method sorting
public getMethodSorting ( ) : string | boolean | phootwork\lang\Comparator | Closure
return string | boolean | phootwork\lang\Comparator | Closure

getPropertySorting() public method

Returns the property sorting
public getPropertySorting ( ) : string | boolean | phootwork\lang\Comparator | Closure
return string | boolean | phootwork\lang\Comparator | Closure

getUseStatementSorting() public method

Returns the use statement sorting
public getUseStatementSorting ( ) : string | boolean | phootwork\lang\Comparator | Closure
return string | boolean | phootwork\lang\Comparator | Closure

isSortingEnabled() public method

Returns whether sorting is enabled
public isSortingEnabled ( ) : boolean
return boolean `true` if it is enabled and `false` if not

setConstantSorting() public method

Returns the constant sorting
public setConstantSorting ( $sorting )
$sorting string|bool|Comparator|\Closure

setGenerateDocblock() public method

Sets whether docblocks should be generated
public setGenerateDocblock ( boolean $generate )
$generate boolean `true` if they will be generated and `false` if not

setGenerateEmptyDocblock() public method

Sets whether empty docblocks are generated
public setGenerateEmptyDocblock ( boolean $generate )
$generate boolean `true` if they will be generated and `false` if not

setGenerateReturnTypeHints() public method

Sets whether return type hints will be generated for method parameters (PHP 7)
public setGenerateReturnTypeHints ( boolean $generate )
$generate boolean `true` if they will be generated and `false` if not

setGenerateScalarTypeHints() public method

Sets whether scalar type hints will be generated for method parameters (PHP 7)
public setGenerateScalarTypeHints ( boolean $generate )
$generate boolean `true` if they will be generated and `false` if not

setMethodSorting() public method

Returns the method sorting
public setMethodSorting ( $sorting )
$sorting string|bool|Comparator|\Closure

setPropertySorting() public method

Returns the property sorting
public setPropertySorting ( $sorting )
$sorting string|bool|Comparator|\Closure

setSortingEnabled() public method

Returns whether sorting is enabled
public setSortingEnabled ( $enabled )
$enabled bool `true` if it is enabled and `false` if not

setUseStatementSorting() public method

Returns the use statement sorting
public setUseStatementSorting ( $sorting )
$sorting string|bool|Comparator|\Closure

Property Details

$options protected_oe property

protected $options