All Downloads are FREE. Search and download functionalities are using the official Maven repository.

php-symfony.model_variables.mustache Maven / Gradle / Ivy

There is a newer version: 7.7.0
Show newest version
    /**
    {{#description}}
     * {{.}}
     *
    {{/description}}
     * @var {{{vendorExtensions.x-comment-type}}}
     * @SerializedName("{{baseName}}")
{{#required}}
     * @Assert\NotNull()
     {{^isPrimitiveType}}
     * @Assert\Valid()
     {{/isPrimitiveType}}
{{/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}}
     * })
     {{#isMap}}
     {{#items}}
     * @Type("array")
     {{/items}}
     {{/isMap}}
     {{^isMap}}
     {{#items}}
     {{#isEnumRef}}
     * @Accessor(getter="getSerialized{{nameInCamelCase}}")
     * @Type("array")
     {{/isEnumRef}}
     {{^isEnumRef}}
     * @Type("array<{{dataType}}>")
     {{/isEnumRef}}
     {{/items}}
     {{/isMap}}
{{/isContainer}}
{{^isContainer}}
    {{#isDate}}
     * @Assert\Type("\Date")
     * @Type("DateTime<'Y-m-d'>")
    {{/isDate}}
    {{#isDateTime}}
     * @Assert\Type("\DateTime"))
     * @Type("DateTime")
    {{/isDateTime}}
    {{#isEnumRef}}
        * @Accessor(getter="getSerialized{{nameInCamelCase}}")
        * @Type("string")
    {{/isEnumRef}}
    {{^isDate}}
    {{^isDateTime}}
    {{^isEnumRef}}
     * @Assert\Type("{{dataType}}")
     * @Type("{{dataType}}")
    {{/isEnumRef}}
    {{/isDateTime}}
    {{/isDate}}
{{/isContainer}}
{{#hasValidation}}
    {{#maxLength}}
     * @Assert\Length(
     *   max = {{.}}
     * )
    {{/maxLength}}
    {{#minLength}}
     * @Assert\Length(
     *   min = {{.}}
     * )
    {{/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}}
    {{#maxItems}}
     * @Assert\Count(
     *   max = {{.}}
     * )
    {{/maxItems}}
    {{#minItems}}
     * @Assert\Count(
     *   min = {{.}}
     * )
    {{/minItems}}
{{/hasValidation}}
     */
    protected {{{vendorExtensions.x-parameter-type}}} ${{name}} = {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy