Method | Description | |
---|---|---|
generate ( array $metadatas, string $outputDirectory ) : void | Generate and write document classes for the given array of ClassMetadataInfo instances | |
generateDocumentClass ( |
Generate a PHP5 Doctrine 2 document class from the given ClassMetadataInfo instance | |
generateUpdatedDocumentClass ( |
Generate the updated code for the given ClassMetadataInfo and document at path | |
setBackupExisting ( boolean $bool ) | Sets a value indicating whether existing documents will be backed up. | |
setClassToExtend ( string $classToExtend ) : void | Set the name of the class the generated classes should extend from | |
setExtension ( string $extension ) : void | Set the extension to use when writing php files to disk | |
setGenerateAnnotations ( boolean $bool ) : void | Set whether or not to generate annotations for the document | |
setGenerateStubMethods ( boolean $bool ) : void | Set whether or not to generate stub methods for the document | |
setNumSpaces ( integer $numSpaces ) : void | Set the number of spaces the exported class should have | |
setRegenerateDocumentIfExists ( boolean $bool ) : void | Set whether or not to regenerate the document if it exists | |
setUpdateDocumentIfExists ( boolean $bool ) : void | Set whether or not to try and update the document if it already exists | |
writeDocumentClass ( |
Generated and write document class to disk for the given ClassMetadataInfo instance |
Method | Description | |
---|---|---|
getTraits ( |
||
isAssociationNullable ( array $fieldMapping ) : boolean |
Method | Description | |
---|---|---|
extendsClass ( ) | ||
generateAssociationMappingPropertyDocBlock ( array $fieldMapping ) | ||
generateChangeTrackingPolicyAnnotation ( |
||
generateDefaultDiscriminatorValueAnnotation ( |
||
generateDiscriminatorFieldAnnotation ( |
||
generateDiscriminatorMapAnnotation ( |
||
generateDocumentAssociationMappingProperties ( |
||
generateDocumentBody ( |
||
generateDocumentClassName ( |
||
generateDocumentConstructor ( |
||
generateDocumentDocBlock ( |
||
generateDocumentFieldMappingProperties ( |
||
generateDocumentImports ( ) | ||
generateDocumentLifecycleCallbackMethods ( |
||
generateDocumentNamespace ( |
||
generateDocumentStubMethod ( |
||
generateDocumentStubMethods ( |
||
generateFieldMappingPropertyDocBlock ( array $fieldMapping, |
||
generateInheritanceAnnotation ( |
||
generateLifecycleCallbackMethod ( $name, $methodName, |
||
getChangeTrackingPolicyString ( $policy ) | ||
getClassName ( |
||
getClassToExtend ( ) | ||
getClassToExtendName ( ) | ||
getIdGeneratorTypeString ( $type ) | ||
getInheritanceTypeString ( $type ) | ||
getNamespace ( |
||
hasMethod ( $method, |
||
hasNamespace ( |
||
hasProperty ( $property, |
||
parseTokensInDocumentFile ( string $path ) | ||
prefixCodeWithSpaces ( $code, $num = 1 ) |
public generateDocumentClass ( |
||
$metadata | ||
return | string | $code |
public generateUpdatedDocumentClass ( |
||
$metadata | ||
$path | string | |
return | string | $code; |
protected isAssociationNullable ( array $fieldMapping ) : boolean | ||
$fieldMapping | array | |
return | boolean |
public setBackupExisting ( boolean $bool ) | ||
$bool | boolean | True to backup existing document, false to overwrite. |
public setClassToExtend ( string $classToExtend ) : void | ||
$classToExtend | string | Class name. |
return | void |
public setExtension ( string $extension ) : void | ||
$extension | string | |
return | void |
public setGenerateAnnotations ( boolean $bool ) : void | ||
$bool | boolean | |
return | void |
public setGenerateStubMethods ( boolean $bool ) : void | ||
$bool | boolean | |
return | void |
public setNumSpaces ( integer $numSpaces ) : void | ||
$numSpaces | integer | |
return | void |
public setRegenerateDocumentIfExists ( boolean $bool ) : void | ||
$bool | boolean | |
return | void |
public setUpdateDocumentIfExists ( boolean $bool ) : void | ||
$bool | boolean | |
return | void |
public writeDocumentClass ( |
||
$metadata | ||
$outputDirectory | string | |
return | void |