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: 3.0.0-rc1
Show newest version
class {{classname}}
{
    /**
     * Possible values of this enum
     */
    {{#allowableValues}}{{#enumVars}}const {{{name}}} = {{{value}}};
    {{/enumVars}}{{/allowableValues}}
    /**
     * Gets allowable values of the enum
     * @return string[]
     */
    public static function getAllowableEnumValues()
    {
        return [
            {{#allowableValues}}{{#enumVars}}self::{{{name}}},{{^-last}}
            {{/-last}}{{/enumVars}}{{/allowableValues}}
        ];
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy