php-symfony.model_variables.mustache Maven / Gradle / Ivy
/**
{{#description}}
* {{description}}
*
{{/description}}
* @var {{{vendorExtensions.x-commentType}}}{{^required}}|null{{/required}}
* @SerializedName("{{baseName}}")
{{#required}}
* @Assert\NotNull()
{{/required}}
{{#isEnum}}
{{#isContainer}}
* @Assert\All({
{{#items}}
* @Assert\Choice({ {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} })
{{/items}}
* })
{{/isContainer}}
{{^isContainer}}
* @Assert\Choice({ {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}}, {{/-last}}{{/enumVars}}{{/allowableValues}} })
{{/isContainer}}
{{/isEnum}}
{{#isContainer}}
* @Assert\All({
{{#items}}
* @Assert\Type("{{datatype}}")
{{/items}}
* })
{{#items}}
* @Type("array<{{datatype}}>")
{{/items}}
{{/isContainer}}
{{^isContainer}}
{{#isDate}}
* @Assert\Date()
* @Type("DateTime")
{{/isDate}}
{{#isDateTime}}
* @Assert\DateTime()
* @Type("DateTime")
{{/isDateTime}}
{{^isDate}}
{{^isDateTime}}
* @Assert\Type("{{datatype}}")
* @Type("{{datatype}}")
{{/isDateTime}}
{{/isDate}}
{{/isContainer}}
{{#hasValidation}}
{{#maxLength}}
* @Assert\Length(
* max = {{maxLength}}
* )
{{/maxLength}}
{{#minLength}}
* @Assert\Length(
* min = {{minLength}}
* )
{{/minLength}}
{{#minimum}}
{{#exclusiveMinimum}}
* @Assert\GreaterThan({{minimum}})
{{/exclusiveMinimum}}
{{^exclusiveMinimum}}
* @Assert\GreaterThanOrEqual({{minimum}})
{{/exclusiveMinimum}}
{{/minimum}}
{{#maximum}}
{{#exclusiveMaximum}}
* @Assert\LessThan({{maximum}})
{{/exclusiveMaximum}}
{{^exclusiveMaximum}}
* @Assert\LessThanOrEqual({{maximum}})
{{/exclusiveMaximum}}
{{/maximum}}
{{#pattern}}
* @Assert\Regex("/{{pattern}}/")
{{/pattern}}
{{#maxItems}}
* @Assert\Count(
* max = {{maxItems}}
* )
{{/maxItems}}
{{#minItems}}
* @Assert\Count(
* min = {{minItems}}
* )
{{/minItems}}
{{/hasValidation}}
*/
protected ${{name}};
© 2015 - 2024 Weber Informatics LLC | Privacy Policy