diff options
Diffstat (limited to 'php/src/Google/Protobuf/Timestamp.php')
-rw-r--r-- | php/src/Google/Protobuf/Timestamp.php | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/php/src/Google/Protobuf/Timestamp.php b/php/src/Google/Protobuf/Timestamp.php index f2286ab4..e21f3231 100644 --- a/php/src/Google/Protobuf/Timestamp.php +++ b/php/src/Google/Protobuf/Timestamp.php @@ -89,9 +89,26 @@ class Timestamp extends \Google\Protobuf\Internal\Message */ private $nanos = 0; - public function __construct() { + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $seconds + * Represents seconds of UTC time since Unix epoch + * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + * 9999-12-31T23:59:59Z inclusive. + * @type int $nanos + * Non-negative fractions of a second at nanosecond resolution. Negative + * second values with fractions must still have non-negative nanos values + * that count forward in time. Must be from 0 to 999,999,999 + * inclusive. + * } + */ + public function __construct($data = NULL) { \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); - parent::__construct(); + parent::__construct($data); } /** @@ -156,7 +173,7 @@ class Timestamp extends \Google\Protobuf\Internal\Message return $this; } - /** + /* * Converts PHP DateTime to Timestamp. * * @param \DateTime $datetime |