php.model_enum.mustache Maven / Gradle / Ivy
class {{classname}}
{
/**
* Possible values of this enum
*/
{{#allowableValues}}
{{#enumVars}}
{{#enumDescription}}
/**
* {{enumDescription}}
*/
{{/enumDescription}}
public 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