php-slim4-server.model_utils_trait.mustache Maven / Gradle / Ivy
ModelReturn (after camelize)
}
// model name starts with number
if (preg_match('/^\d.*/', $name) === 1) {
$name = 'model_' . $name; // e.g. 200Response => Model200Response (after camelize)
}
// add prefix and/or suffic only if name does not start wth \ (e.g. \DateTime)
if (preg_match('/^\\\\.*/', $name) !== 1) {
if (is_string($modelNamePrefix) && !empty($modelNamePrefix)) {
$name = $modelNamePrefix . '_' . $name;
}
if (is_string($modelNameSuffix) && !empty($modelNameSuffix)) {
$name = $name . '_' . $modelNameSuffix;
}
}
// camelize the model name
// phone_number => PhoneNumber
return self::camelize($name);
}
}
{{/apiInfo}}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy