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

php.model_enum.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
class {{classname}}
{
    /**
     * Possible values of this enum
     */
    {{#allowableValues}}
    {{#enumVars}}
    public const {{^isString}}NUMBER_{{/isString}}{{{name}}} = {{{value}}};

    {{/enumVars}}
    {{/allowableValues}}
    /**
     * Gets allowable values of the enum
     * @return string[]
     */
    public static function getAllowableEnumValues()
    {
        return [
            {{#allowableValues}}
            {{#enumVars}}
            self::{{^isString}}NUMBER_{{/isString}}{{{name}}}{{^-last}},
            {{/-last}}
            {{/enumVars}}
            {{/allowableValues}}

        ];
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy