Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
b61dd9d9
Unverified
Commit
b61dd9d9
authored
May 11, 2018
by
Paul Yang
Committed by
GitHub
May 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add file option php_metadata_namespace and ruby_package (#4609)
parent
2213c1c1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
103 additions
and
0 deletions
+103
-0
Descriptor.cs
csharp/src/Google.Protobuf/Reflection/Descriptor.cs
+0
-0
Descriptor.php
php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
+2
-0
FileOptions.php
php/src/Google/Protobuf/Internal/FileOptions.php
+90
-0
descriptor.pb.cc
src/google/protobuf/descriptor.pb.cc
+0
-0
descriptor.pb.h
src/google/protobuf/descriptor.pb.h
+0
-0
descriptor.proto
src/google/protobuf/descriptor.proto
+11
-0
No files found.
csharp/src/Google.Protobuf/Reflection/Descriptor.cs
View file @
b61dd9d9
This diff is collapsed.
Click to expand it.
php/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
View file @
b61dd9d9
...
...
@@ -159,6 +159,8 @@ class Descriptor
->
optional
(
'swift_prefix'
,
\Google\Protobuf\Internal\GPBType
::
STRING
,
39
)
->
optional
(
'php_class_prefix'
,
\Google\Protobuf\Internal\GPBType
::
STRING
,
40
)
->
optional
(
'php_namespace'
,
\Google\Protobuf\Internal\GPBType
::
STRING
,
41
)
->
optional
(
'php_metadata_namespace'
,
\Google\Protobuf\Internal\GPBType
::
STRING
,
44
)
->
optional
(
'ruby_package'
,
\Google\Protobuf\Internal\GPBType
::
STRING
,
45
)
->
repeated
(
'uninterpreted_option'
,
\Google\Protobuf\Internal\GPBType
::
MESSAGE
,
999
,
'google.protobuf.internal.UninterpretedOption'
)
->
finalizeToPool
();
...
...
php/src/Google/Protobuf/Internal/FileOptions.php
View file @
b61dd9d9
...
...
@@ -173,6 +173,24 @@ class FileOptions extends \Google\Protobuf\Internal\Message
*/
private
$php_namespace
=
''
;
private
$has_php_namespace
=
false
;
/**
* Use this option to change the namespace of php generated metadata classes.
* Default is empty. When this option is empty, the proto file name will be used
* for determining the namespace.
*
* Generated from protobuf field <code>optional string php_metadata_namespace = 44;</code>
*/
private
$php_metadata_namespace
=
''
;
private
$has_php_metadata_namespace
=
false
;
/**
* Use this option to change the package of ruby generated classes. Default
* is empty. When this option is not set, the package name will be used for
* determining the ruby package.
*
* Generated from protobuf field <code>optional string ruby_package = 45;</code>
*/
private
$ruby_package
=
''
;
private
$has_ruby_package
=
false
;
/**
* The parser stores options it doesn't recognize here.
* See the documentation for the "Options" section above.
...
...
@@ -827,6 +845,78 @@ class FileOptions extends \Google\Protobuf\Internal\Message
return
$this
->
has_php_namespace
;
}
/**
* Use this option to change the namespace of php generated metadata classes.
* Default is empty. When this option is empty, the proto file name will be used
* for determining the namespace.
*
* Generated from protobuf field <code>optional string php_metadata_namespace = 44;</code>
* @return string
*/
public
function
getPhpMetadataNamespace
()
{
return
$this
->
php_metadata_namespace
;
}
/**
* Use this option to change the namespace of php generated metadata classes.
* Default is empty. When this option is empty, the proto file name will be used
* for determining the namespace.
*
* Generated from protobuf field <code>optional string php_metadata_namespace = 44;</code>
* @param string $var
* @return $this
*/
public
function
setPhpMetadataNamespace
(
$var
)
{
GPBUtil
::
checkString
(
$var
,
True
);
$this
->
php_metadata_namespace
=
$var
;
$this
->
has_php_metadata_namespace
=
true
;
return
$this
;
}
public
function
hasPhpMetadataNamespace
()
{
return
$this
->
has_php_metadata_namespace
;
}
/**
* Use this option to change the package of ruby generated classes. Default
* is empty. When this option is not set, the package name will be used for
* determining the ruby package.
*
* Generated from protobuf field <code>optional string ruby_package = 45;</code>
* @return string
*/
public
function
getRubyPackage
()
{
return
$this
->
ruby_package
;
}
/**
* Use this option to change the package of ruby generated classes. Default
* is empty. When this option is not set, the package name will be used for
* determining the ruby package.
*
* Generated from protobuf field <code>optional string ruby_package = 45;</code>
* @param string $var
* @return $this
*/
public
function
setRubyPackage
(
$var
)
{
GPBUtil
::
checkString
(
$var
,
True
);
$this
->
ruby_package
=
$var
;
$this
->
has_ruby_package
=
true
;
return
$this
;
}
public
function
hasRubyPackage
()
{
return
$this
->
has_ruby_package
;
}
/**
* The parser stores options it doesn't recognize here.
* See the documentation for the "Options" section above.
...
...
src/google/protobuf/descriptor.pb.cc
View file @
b61dd9d9
This diff is collapsed.
Click to expand it.
src/google/protobuf/descriptor.pb.h
View file @
b61dd9d9
This diff is collapsed.
Click to expand it.
src/google/protobuf/descriptor.proto
View file @
b61dd9d9
...
...
@@ -417,6 +417,17 @@ message FileOptions {
// determining the namespace.
optional
string
php_namespace
=
41
;
// Use this option to change the namespace of php generated metadata classes.
// Default is empty. When this option is empty, the proto file name will be used
// for determining the namespace.
optional
string
php_metadata_namespace
=
44
;
// Use this option to change the package of ruby generated classes. Default
// is empty. When this option is not set, the package name will be used for
// determining the ruby package.
optional
string
ruby_package
=
45
;
// The parser stores options it doesn't recognize here.
// See the documentation for the "Options" section above.
repeated
UninterpretedOption
uninterpreted_option
=
999
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment