diff options
Diffstat (limited to 'php/src/Google/Protobuf/Internal/FieldDescriptor.php')
-rw-r--r-- | php/src/Google/Protobuf/Internal/FieldDescriptor.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/php/src/Google/Protobuf/Internal/FieldDescriptor.php b/php/src/Google/Protobuf/Internal/FieldDescriptor.php index 1443c6fd..6644a2e0 100644 --- a/php/src/Google/Protobuf/Internal/FieldDescriptor.php +++ b/php/src/Google/Protobuf/Internal/FieldDescriptor.php @@ -181,6 +181,12 @@ class FieldDescriptor $this->getMessageType()->getOptions()->getMapEntry(); } + public function isTimestamp() + { + return $this->getType() == GPBType::MESSAGE && + $this->getMessageType()->getClass() === "Google\Protobuf\Timestamp"; + } + private static function isTypePackable($field_type) { return ($field_type !== GPBType::STRING && |