Merge pull request #1446 from wing328/php_improvement1

[PHP] add OAuth support
This commit is contained in:
wing328
2015-10-31 22:46:52 +08:00
5 changed files with 72 additions and 9 deletions

View File

@@ -334,6 +334,9 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
// Note: backslash ("\\") is allowed for e.g. "\\DateTime"
name = name.replaceAll("[^\\w\\\\]+", "_");
// remove dollar sign
name = name.replaceAll("$", "");
// model name cannot use reserved keyword
if (reservedWords.contains(name)) {
escapeReservedWord(name); // e.g. return => _return