Documentation

MakeEntity extends AbstractMaker
in package
implements InputAwareMakerInterface

FinalYes

Convenient abstract class for makers.

Tags
author

Javier Eguiluz javier.eguiluz@gmail.com

author

Ryan Weaver weaverryan@gmail.com

author

Kévin Dunglas dunglas@gmail.com

Table of Contents

Interfaces

InputAwareMakerInterface
Lets the configureDependencies method access to the command's input.

Properties

$doctrineHelper  : DoctrineHelper
$entityClassGenerator  : EntityClassGenerator
$fileManager  : FileManager
$generator  : Generator
$phpCompatUtil  : PhpCompatUtil

Methods

__construct()  : mixed
configureCommand()  : void
configureDependencies()  : void
Configure any library dependencies that your maker requires.
generate()  : void
getCommandDescription()  : string
getCommandName()  : string
interact()  : void
If necessary, you can use this method to interactively ask the user for input.
addDependencies()  : string
writeSuccessMessage()  : void
askForNextField()  : EntityRelation|array<string|int, mixed>|null
askRelationDetails()  : EntityRelation
askRelationType()  : mixed
createClassManipulator()  : ClassSourceManipulator
createEntityClassQuestion()  : Question
doesEntityUseAttributeMapping()  : bool
getEntityNamespace()  : string
getPathOfClass()  : string
getPropertyNames()  : array<string|int, mixed>
getTypesMap()  : array<string|int, mixed>
isClassInVendor()  : bool
printAvailableTypes()  : void
regenerateEntities()  : void

Properties

$doctrineHelper

private DoctrineHelper $doctrineHelper

$entityClassGenerator

private EntityClassGenerator $entityClassGenerator

$phpCompatUtil

private PhpCompatUtil $phpCompatUtil

Methods

__construct()

public __construct(FileManager $fileManager, DoctrineHelper $doctrineHelper[, string $projectDirectory = null ][, Generator $generator = null ][, EntityClassGenerator $entityClassGenerator = null ][, PhpCompatUtil $phpCompatUtil = null ]) : mixed
Parameters
$fileManager : FileManager
$doctrineHelper : DoctrineHelper
$projectDirectory : string = null
$generator : Generator = null
$entityClassGenerator : EntityClassGenerator = null
$phpCompatUtil : PhpCompatUtil = null

getCommandDescription()

public static getCommandDescription() : string
Return values
string

getCommandName()

public static getCommandName() : string
Return values
string

addDependencies()

protected addDependencies(array<string|int, mixed> $dependencies[, string $message = null ]) : string
Parameters
$dependencies : array<string|int, mixed>
$message : string = null
Return values
string

askForNextField()

private askForNextField(ConsoleStyle $io, array<string|int, mixed> $fields, string $entityClass, bool $isFirstField) : EntityRelation|array<string|int, mixed>|null
Parameters
$io : ConsoleStyle
$fields : array<string|int, mixed>
$entityClass : string
$isFirstField : bool
Return values
EntityRelation|array<string|int, mixed>|null

askRelationDetails()

private askRelationDetails(ConsoleStyle $io, string $generatedEntityClass, string $type, string $newFieldName) : EntityRelation
Parameters
$io : ConsoleStyle
$generatedEntityClass : string
$type : string
$newFieldName : string
Return values
EntityRelation

askRelationType()

private askRelationType(ConsoleStyle $io, string $entityClass, string $targetEntityClass) : mixed
Parameters
$io : ConsoleStyle
$entityClass : string
$targetEntityClass : string

createClassManipulator()

private createClassManipulator(string $path, ConsoleStyle $io, bool $overwrite) : ClassSourceManipulator
Parameters
$path : string
$io : ConsoleStyle
$overwrite : bool
Return values
ClassSourceManipulator

createEntityClassQuestion()

private createEntityClassQuestion(string $questionText) : Question
Parameters
$questionText : string
Return values
Question

doesEntityUseAttributeMapping()

private doesEntityUseAttributeMapping(string $className) : bool
Parameters
$className : string
Tags
legacy

Drop when Annotations are no longer supported

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

regenerateEntities()

private regenerateEntities(string $classOrNamespace, bool $overwrite, Generator $generator) : void
Parameters
$classOrNamespace : string
$overwrite : bool
$generator : Generator

        
On this page

Search results