Namespaces | Functions | Variables
php_generator.cc File Reference
#include <google/protobuf/compiler/php/php_generator.h>
#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/plugin.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/io/zero_copy_stream.h>
#include <google/protobuf/stubs/strutil.h>
#include <sstream>
Include dependency graph for php_generator.cc:

Go to the source code of this file.

Namespaces

 google
 
 google::protobuf
 
 google::protobuf::compiler
 
 google::protobuf::compiler::php
 

Functions

std::string google::protobuf::compiler::php::BinaryToHex (const string &binary)
 
std::string google::protobuf::compiler::php::ClassNamePrefix (const string &classname)
 
template<typename DescriptorType >
std::string google::protobuf::compiler::php::ClassNamePrefix (const string &classname, const DescriptorType *desc)
 
std::string google::protobuf::compiler::php::ConstantNamePrefix (const string &classname)
 
std::string google::protobuf::compiler::php::DefaultForField (const FieldDescriptor *field)
 
std::string google::protobuf::compiler::php::DefaultForField (FieldDescriptor *field)
 
template<typename DescriptorType >
std::string google::protobuf::compiler::php::DescriptorFullName (const DescriptorType *desc, bool is_descriptor)
 
std::string google::protobuf::compiler::php::EnumOrMessageSuffix (const FieldDescriptor *field, bool is_descriptor)
 
std::string google::protobuf::compiler::php::EscapeDollor (const string &to_escape)
 
static string google::protobuf::compiler::php::EscapePhpdoc (const string &input)
 
std::string google::protobuf::compiler::php::FilenameToClassname (const string &filename)
 
static string google::protobuf::compiler::php::FirstLineOf (const string &value)
 
template<typename DescriptorType >
std::string google::protobuf::compiler::php::FullClassName (const DescriptorType *desc, bool is_descriptor)
 
void google::protobuf::compiler::php::GenerateAddFileToPool (const FileDescriptor *file, bool is_descriptor, io::Printer *printer)
 
template<typename DescriptorType >
std::string google::protobuf::compiler::php::GeneratedClassFileName (const DescriptorType *desc, bool is_descriptor)
 
std::string google::protobuf::compiler::php::GeneratedClassName (const Descriptor *desc)
 
std::string google::protobuf::compiler::php::GeneratedClassName (const EnumDescriptor *desc)
 
std::string google::protobuf::compiler::php::GeneratedClassName (const ServiceDescriptor *desc)
 
template<typename DescriptorType >
std::string google::protobuf::compiler::php::GeneratedClassNameImpl (const DescriptorType *desc)
 
std::string google::protobuf::compiler::php::GeneratedClassNameImpl (const ServiceDescriptor *desc)
 
std::string google::protobuf::compiler::php::GeneratedMetadataFileName (const FileDescriptor *file, bool is_descriptor)
 
template<typename DescriptorType >
static void google::protobuf::compiler::php::GenerateDocCommentBody (io::Printer *printer, const DescriptorType *descriptor)
 
static void google::protobuf::compiler::php::GenerateDocCommentBodyForLocation (io::Printer *printer, const SourceLocation &location, bool trailingNewline, int indentCount)
 
std::string google::protobuf::compiler::php::GeneratedServiceFileName (const ServiceDescriptor *service, bool is_descriptor)
 
void google::protobuf::compiler::php::GenerateEnumDocComment (io::Printer *printer, const EnumDescriptor *enum_, int is_descriptor)
 
void google::protobuf::compiler::php::GenerateEnumFile (const FileDescriptor *file, const EnumDescriptor *en, bool is_descriptor, GeneratorContext *generator_context)
 
void google::protobuf::compiler::php::GenerateEnumToPool (const EnumDescriptor *en, io::Printer *printer)
 
void google::protobuf::compiler::php::GenerateEnumValueDocComment (io::Printer *printer, const EnumValueDescriptor *value)
 
void google::protobuf::compiler::php::GenerateField (const FieldDescriptor *field, io::Printer *printer, bool is_descriptor)
 
void google::protobuf::compiler::php::GenerateFieldAccessor (const FieldDescriptor *field, bool is_descriptor, io::Printer *printer)
 
void google::protobuf::compiler::php::GenerateFieldDocComment (io::Printer *printer, const FieldDescriptor *field, int is_descriptor, int function_type)
 
void google::protobuf::compiler::php::GenerateFile (const FileDescriptor *file, bool is_descriptor, GeneratorContext *generator_context)
 
void google::protobuf::compiler::php::GenerateHead (const FileDescriptor *file, io::Printer *printer)
 
void google::protobuf::compiler::php::GenerateMessageConstructorDocComment (io::Printer *printer, const Descriptor *message, int is_descriptor)
 
void google::protobuf::compiler::php::GenerateMessageDocComment (io::Printer *printer, const Descriptor *message, int is_descriptor)
 
void google::protobuf::compiler::php::GenerateMessageFile (const FileDescriptor *file, const Descriptor *message, bool is_descriptor, GeneratorContext *generator_context)
 
void google::protobuf::compiler::php::GenerateMessageToPool (const string &name_prefix, const Descriptor *message, io::Printer *printer)
 
void google::protobuf::compiler::php::GenerateMetadataFile (const FileDescriptor *file, bool is_descriptor, GeneratorContext *generator_context)
 
void google::protobuf::compiler::php::GenerateOneofField (const OneofDescriptor *oneof, io::Printer *printer)
 
void google::protobuf::compiler::php::GenerateServiceDocComment (io::Printer *printer, const ServiceDescriptor *service)
 
void google::protobuf::compiler::php::GenerateServiceFile (const FileDescriptor *file, const ServiceDescriptor *service, bool is_descriptor, GeneratorContext *generator_context)
 
void google::protobuf::compiler::php::GenerateServiceMethod (const MethodDescriptor *method, io::Printer *printer)
 
void google::protobuf::compiler::php::GenerateServiceMethodDocComment (io::Printer *printer, const MethodDescriptor *method)
 
void google::protobuf::compiler::php::GenerateUseDeclaration (bool is_descriptor, io::Printer *printer)
 
void google::protobuf::compiler::php::GenerateWrapperFieldGetterDocComment (io::Printer *printer, const FieldDescriptor *field)
 
void google::protobuf::compiler::php::GenerateWrapperFieldSetterDocComment (io::Printer *printer, const FieldDescriptor *field)
 
void google::protobuf::compiler::php::Indent (io::Printer *printer)
 
std::string google::protobuf::compiler::php::IntToString (int32 value)
 
std::string google::protobuf::compiler::php::LabelForField (const FieldDescriptor *field)
 
std::string google::protobuf::compiler::php::LabelForField (FieldDescriptor *field)
 
template<typename DescriptorType >
std::string google::protobuf::compiler::php::LegacyFullClassName (const DescriptorType *desc, bool is_descriptor)
 
template<typename DescriptorType >
void google::protobuf::compiler::php::LegacyGenerateClassFile (const FileDescriptor *file, const DescriptorType *desc, bool is_descriptor, GeneratorContext *generator_context)
 
template<typename DescriptorType >
std::string google::protobuf::compiler::php::LegacyGeneratedClassFileName (const DescriptorType *desc, bool is_descriptor)
 
template<typename DescriptorType >
std::string google::protobuf::compiler::php::LegacyGeneratedClassName (const DescriptorType *desc)
 
void google::protobuf::compiler::php::Outdent (io::Printer *printer)
 
std::string google::protobuf::compiler::php::PhpGetterTypeName (const FieldDescriptor *field, bool is_descriptor)
 
std::string google::protobuf::compiler::php::PhpName (const std::string &full_name, bool is_descriptor)
 
std::string google::protobuf::compiler::php::PhpSetterTypeName (const FieldDescriptor *field, bool is_descriptor)
 
std::string google::protobuf::compiler::php::ReservedNamePrefix (const string &classname, const FileDescriptor *file)
 
template<typename DescriptorType >
std::string google::protobuf::compiler::php::RootPhpNamespace (const DescriptorType *desc, bool is_descriptor)
 
std::string google::protobuf::compiler::php::TypeName (const FieldDescriptor *field)
 
std::string google::protobuf::compiler::php::TypeName (FieldDescriptor *field)
 
std::string google::protobuf::compiler::php::UnderscoresToCamelCase (const string &name, bool cap_first_letter)
 

Variables

const std::string kDescriptorDirName = "Google/Protobuf/Internal"
 
const std::string kDescriptorFile = "google/protobuf/descriptor.proto"
 
const std::string kDescriptorMetadataFile
 
const std::string kDescriptorPackageName = "Google\\Protobuf\\Internal"
 
const std::string kEmptyFile = "google/protobuf/empty.proto"
 
const std::string kEmptyMetadataFile = "GPBMetadata/Google/Protobuf/GPBEmpty.php"
 
const int kFieldGetter = 2
 
const int kFieldProperty = 3
 
const int kFieldSetter = 1
 
const char *const kReservedNames []
 
const int kReservedNamesSize = 73
 
const char *const kValidConstantNames []
 
const int kValidConstantNamesSize = 9
 

Variable Documentation

◆ kDescriptorDirName

const std::string kDescriptorDirName = "Google/Protobuf/Internal"

Definition at line 48 of file php_generator.cc.

◆ kDescriptorFile

const std::string kDescriptorFile = "google/protobuf/descriptor.proto"

Definition at line 43 of file php_generator.cc.

◆ kDescriptorMetadataFile

const std::string kDescriptorMetadataFile
Initial value:
=
"GPBMetadata/Google/Protobuf/Internal/Descriptor.php"

Definition at line 46 of file php_generator.cc.

◆ kDescriptorPackageName

const std::string kDescriptorPackageName = "Google\\Protobuf\\Internal"

Definition at line 49 of file php_generator.cc.

◆ kEmptyFile

const std::string kEmptyFile = "google/protobuf/empty.proto"

Definition at line 44 of file php_generator.cc.

◆ kEmptyMetadataFile

const std::string kEmptyMetadataFile = "GPBMetadata/Google/Protobuf/GPBEmpty.php"

Definition at line 45 of file php_generator.cc.

◆ kFieldGetter

const int kFieldGetter = 2

Definition at line 73 of file php_generator.cc.

◆ kFieldProperty

const int kFieldProperty = 3

Definition at line 74 of file php_generator.cc.

◆ kFieldSetter

const int kFieldSetter = 1

Definition at line 72 of file php_generator.cc.

◆ kReservedNames

const char* const kReservedNames[]
Initial value:
= {
"abstract", "and", "array", "as", "break",
"callable", "case", "catch", "class", "clone",
"const", "continue", "declare", "default", "die",
"do", "echo", "else", "elseif", "empty",
"enddeclare", "endfor", "endforeach", "endif", "endswitch",
"endwhile", "eval", "exit", "extends", "final",
"for", "foreach", "function", "global", "goto",
"if", "implements", "include", "include_once", "instanceof",
"insteadof", "interface", "isset", "list", "namespace",
"new", "or", "print", "private", "protected",
"public", "require", "require_once", "return", "static",
"switch", "throw", "trait", "try", "unset",
"use", "var", "while", "xor", "int",
"float", "bool", "string", "true", "false",
"null", "void", "iterable"}

Definition at line 50 of file php_generator.cc.

◆ kReservedNamesSize

const int kReservedNamesSize = 73

Definition at line 70 of file php_generator.cc.

◆ kValidConstantNames

const char* const kValidConstantNames[]
Initial value:
= {
"int", "float", "bool", "string", "true",
"false", "null", "void", "iterable",
}

Definition at line 66 of file php_generator.cc.

◆ kValidConstantNamesSize

const int kValidConstantNamesSize = 9

Definition at line 71 of file php_generator.cc.



libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:04