MakeEntity
extends AbstractMaker
in package
implements
InputAwareMakerInterface
Convenient abstract class for makers.
Tags
Interfaces, Classes, Traits and Enums
- InputAwareMakerInterface
- Lets the configureDependencies method access to the command's input.
Table of Contents
- $doctrineHelper : mixed
- $entityClassGenerator : mixed
- $fileManager : mixed
- $generator : mixed
- __construct() : mixed
- configureCommand() : mixed
- configureDependencies() : mixed
- Configure any library dependencies that your maker requires.
- generate() : mixed
- getCommandDescription() : string
- getCommandName() : string
- interact() : mixed
- If necessary, you can use this method to interactively ask the user for input.
- addDependencies() : string
- writeSuccessMessage() : mixed
- askForNextField() : mixed
- askRelationDetails() : mixed
- askRelationType() : mixed
- createClassManipulator() : ClassSourceManipulator
- createEntityClassQuestion() : Question
- doesEntityUseAnnotationMapping() : bool
- doesEntityUseAttributeMapping() : bool
- getEntityNamespace() : string
- getPathOfClass() : string
- getPropertyNames() : array<string|int, mixed>
- getTypesMap() : array<string|int, mixed>
- isClassInVendor() : bool
- printAvailableTypes() : mixed
- regenerateEntities() : mixed
Properties
$doctrineHelper
private
mixed
$doctrineHelper
$entityClassGenerator
private
mixed
$entityClassGenerator
$fileManager
private
mixed
$fileManager
$generator
private
mixed
$generator
Methods
__construct()
public
__construct(FileManager $fileManager, DoctrineHelper $doctrineHelper, string $projectDirectory[, Generator $generator = null ][, EntityClassGenerator $entityClassGenerator = null ]) : mixed
Parameters
- $fileManager : FileManager
- $doctrineHelper : DoctrineHelper
- $projectDirectory : string
- $generator : Generator = null
- $entityClassGenerator : EntityClassGenerator = null
Return values
mixed —configureCommand()
public
configureCommand(Command $command, InputConfiguration $inputConf) : mixed
Parameters
- $command : Command
- $inputConf : InputConfiguration
Return values
mixed —configureDependencies()
Configure any library dependencies that your maker requires.
public
configureDependencies(DependencyBuilder $dependencies[, InputInterface $input = null ]) : mixed
Parameters
- $dependencies : DependencyBuilder
- $input : InputInterface = null
Return values
mixed —generate()
public
generate(InputInterface $input, ConsoleStyle $io, Generator $generator) : mixed
Parameters
- $input : InputInterface
- $io : ConsoleStyle
- $generator : Generator
Return values
mixed —getCommandDescription()
public
static getCommandDescription() : string
Return values
string —getCommandName()
public
static getCommandName() : string
Return values
string —interact()
If necessary, you can use this method to interactively ask the user for input.
public
interact(InputInterface $input, ConsoleStyle $io, Command $command) : mixed
Parameters
- $input : InputInterface
- $io : ConsoleStyle
- $command : Command
Return values
mixed —addDependencies()
protected
addDependencies(array<string|int, mixed> $dependencies[, string $message = null ]) : string
Parameters
- $dependencies : array<string|int, mixed>
- $message : string = null
Return values
string —writeSuccessMessage()
protected
writeSuccessMessage(ConsoleStyle $io) : mixed
Parameters
- $io : ConsoleStyle
Return values
mixed —askForNextField()
private
askForNextField(ConsoleStyle $io, array<string|int, mixed> $fields, string $entityClass, bool $isFirstField) : mixed
Parameters
- $io : ConsoleStyle
- $fields : array<string|int, mixed>
- $entityClass : string
- $isFirstField : bool
Return values
mixed —askRelationDetails()
private
askRelationDetails(ConsoleStyle $io, string $generatedEntityClass, string $type, string $newFieldName) : mixed
Parameters
- $io : ConsoleStyle
- $generatedEntityClass : string
- $type : string
- $newFieldName : string
Return values
mixed —askRelationType()
private
askRelationType(ConsoleStyle $io, string $entityClass, string $targetEntityClass) : mixed
Parameters
- $io : ConsoleStyle
- $entityClass : string
- $targetEntityClass : string
Return values
mixed —createClassManipulator()
private
createClassManipulator(string $path, ConsoleStyle $io, bool $overwrite, string $className) : ClassSourceManipulator
Parameters
- $path : string
- $io : ConsoleStyle
- $overwrite : bool
- $className : string
Return values
ClassSourceManipulator —createEntityClassQuestion()
private
createEntityClassQuestion(string $questionText) : Question
Parameters
- $questionText : string
Return values
Question —doesEntityUseAnnotationMapping()
private
doesEntityUseAnnotationMapping(string $className) : bool
Parameters
- $className : string
Return values
bool —doesEntityUseAttributeMapping()
private
doesEntityUseAttributeMapping(string $className) : bool
Parameters
- $className : string
Return values
bool —getEntityNamespace()
private
getEntityNamespace() : string
Return values
string —getPathOfClass()
private
getPathOfClass(string $class) : string
Parameters
- $class : string
Return values
string —getPropertyNames()
private
getPropertyNames(string $class) : array<string|int, mixed>
Parameters
- $class : string
Return values
array<string|int, mixed> —getTypesMap()
private
getTypesMap() : array<string|int, mixed>
Return values
array<string|int, mixed> —isClassInVendor()
private
isClassInVendor(string $class) : bool
Parameters
- $class : string
Return values
bool —printAvailableTypes()
private
printAvailableTypes(ConsoleStyle $io) : mixed
Parameters
- $io : ConsoleStyle
Return values
mixed —regenerateEntities()
private
regenerateEntities(string $classOrNamespace, bool $overwrite, Generator $generator) : mixed
Parameters
- $classOrNamespace : string
- $overwrite : bool
- $generator : Generator