github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/openapi-generator/templates/php/model_enum.mustache (about) 1 class {{classname}} 2 { 3 /** 4 * Possible values of this enum 5 */ 6 {{#allowableValues}}{{#enumVars}}const {{{name}}} = {{{value}}}; 7 {{/enumVars}}{{/allowableValues}} 8 /** 9 * Gets allowable values of the enum 10 * @return string[] 11 */ 12 public static function getAllowableEnumValues() 13 { 14 return [ 15 {{#allowableValues}}{{#enumVars}}self::{{{name}}},{{^-last}} 16 {{/-last}}{{/enumVars}}{{/allowableValues}} 17 ]; 18 } 19 }