ConfigBuilderGenerator
in package
implements
ConfigBuilderGeneratorInterface
Generate ConfigBuilders to help create valid config.
Tags
Interfaces, Classes and Traits
- ConfigBuilderGeneratorInterface
- Generates ConfigBuilders to help create valid config.
Table of Contents
- $classes : array<string|int, ClassBuilder>
- $outputDir : mixed
- __construct() : mixed
- build() : Closure
- buildConstructor() : void
- buildNode() : void
- buildSetExtraKey() : void
- buildToArray() : void
- getComment() : string
- getFullPath() : string
- getParameterType() : string|null
- getSingularName() : string
- Pick a good singular name.
- getSubNamespace() : string
- getType() : string
- handleArrayNode() : void
- handlePrototypedArrayNode() : void
- handleScalarNode() : void
- handleVariableNode() : void
- hasNormalizationClosures() : bool
- writeClasses() : void
Properties
$classes
private
array<string|int, ClassBuilder>
$classes
$outputDir
private
mixed
$outputDir
Methods
__construct()
public
__construct(string $outputDir) : mixed
Parameters
- $outputDir : string
Return values
mixed —build()
public
build(ConfigurationInterface $configuration) : Closure
Parameters
- $configuration : ConfigurationInterface
Return values
Closure —that will return the root config class
buildConstructor()
private
buildConstructor(ClassBuilder $class) : void
Parameters
- $class : ClassBuilder
Return values
void —buildNode()
private
buildNode(NodeInterface $node, ClassBuilder $class, string $namespace) : void
Parameters
- $node : NodeInterface
- $class : ClassBuilder
- $namespace : string
Return values
void —buildSetExtraKey()
private
buildSetExtraKey(ClassBuilder $class) : void
Parameters
- $class : ClassBuilder
Return values
void —buildToArray()
private
buildToArray(ClassBuilder $class) : void
Parameters
- $class : ClassBuilder
Return values
void —getComment()
private
getComment(VariableNode $node) : string
Parameters
- $node : VariableNode
Return values
string —getFullPath()
private
getFullPath(ClassBuilder $class) : string
Parameters
- $class : ClassBuilder
Return values
string —getParameterType()
private
getParameterType(NodeInterface $node) : string|null
Parameters
- $node : NodeInterface
Return values
string|null —getSingularName()
Pick a good singular name.
private
getSingularName(PrototypedArrayNode $node) : string
Parameters
- $node : PrototypedArrayNode
Return values
string —getSubNamespace()
private
getSubNamespace(ClassBuilder $rootClass) : string
Parameters
- $rootClass : ClassBuilder
Return values
string —getType()
private
getType(string $classType, bool $hasNormalizationClosures) : string
Parameters
- $classType : string
- $hasNormalizationClosures : bool
Return values
string —handleArrayNode()
private
handleArrayNode(ArrayNode $node, ClassBuilder $class, string $namespace) : void
Parameters
- $node : ArrayNode
- $class : ClassBuilder
- $namespace : string
Return values
void —handlePrototypedArrayNode()
private
handlePrototypedArrayNode(PrototypedArrayNode $node, ClassBuilder $class, string $namespace) : void
Parameters
- $node : PrototypedArrayNode
- $class : ClassBuilder
- $namespace : string
Return values
void —handleScalarNode()
private
handleScalarNode(ScalarNode $node, ClassBuilder $class) : void
Parameters
- $node : ScalarNode
- $class : ClassBuilder
Return values
void —handleVariableNode()
private
handleVariableNode(VariableNode $node, ClassBuilder $class) : void
Parameters
- $node : VariableNode
- $class : ClassBuilder
Return values
void —hasNormalizationClosures()
private
hasNormalizationClosures(NodeInterface $node) : bool
Parameters
- $node : NodeInterface
Return values
bool —writeClasses()
private
writeClasses() : void