File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/modules/pull/vendor/Google/Protobuf/SourceCodeInfo/Location.php
Back
<?php /** * Generated by Protobuf protoc plugin. * * File descriptor : descriptor.proto */ namespace google\protobuf\SourceCodeInfo; /** * Protobuf message : google.protobuf.SourceCodeInfo.Location */ class Location extends \Protobuf\AbstractMessage { /** * @var \Protobuf\UnknownFieldSet */ protected $unknownFieldSet = null; /** * @var \Protobuf\Extension\ExtensionFieldMap */ protected $extensions = null; /** * path repeated int32 = 1 * * @var \Protobuf\Collection */ protected $path = null; /** * span repeated int32 = 2 * * @var \Protobuf\Collection */ protected $span = null; /** * leading_comments optional string = 3 * * @var string */ protected $leading_comments = null; /** * trailing_comments optional string = 4 * * @var string */ protected $trailing_comments = null; /** * leading_detached_comments repeated string = 6 * * @var \Protobuf\Collection */ protected $leading_detached_comments = null; /** * Check if 'path' has a value * * @return bool */ public function hasPathList() { return $this->path !== null; } /** * Get 'path' value * * @return \Protobuf\Collection */ public function getPathList() { return $this->path; } /** * Set 'path' value * * @param \Protobuf\Collection $value */ public function setPathList(\Protobuf\Collection $value = null) { $this->path = $value; } /** * Add a new element to 'path' * * @param int $value */ public function addPath($value) { if ($this->path === null) { $this->path = new \Protobuf\ScalarCollection(); } $this->path->add($value); } /** * Check if 'span' has a value * * @return bool */ public function hasSpanList() { return $this->span !== null; } /** * Get 'span' value * * @return \Protobuf\Collection */ public function getSpanList() { return $this->span; } /** * Set 'span' value * * @param \Protobuf\Collection $value */ public function setSpanList(\Protobuf\Collection $value = null) { $this->span = $value; } /** * Add a new element to 'span' * * @param int $value */ public function addSpan($value) { if ($this->span === null) { $this->span = new \Protobuf\ScalarCollection(); } $this->span->add($value); } /** * Check if 'leading_comments' has a value * * @return bool */ public function hasLeadingComments() { return $this->leading_comments !== null; } /** * Get 'leading_comments' value * * @return string */ public function getLeadingComments() { return $this->leading_comments; } /** * Set 'leading_comments' value * * @param string $value */ public function setLeadingComments($value = null) { $this->leading_comments = $value; } /** * Check if 'trailing_comments' has a value * * @return bool */ public function hasTrailingComments() { return $this->trailing_comments !== null; } /** * Get 'trailing_comments' value * * @return string */ public function getTrailingComments() { return $this->trailing_comments; } /** * Set 'trailing_comments' value * * @param string $value */ public function setTrailingComments($value = null) { $this->trailing_comments = $value; } /** * Check if 'leading_detached_comments' has a value * * @return bool */ public function hasLeadingDetachedCommentsList() { return $this->leading_detached_comments !== null; } /** * Get 'leading_detached_comments' value * * @return \Protobuf\Collection */ public function getLeadingDetachedCommentsList() { return $this->leading_detached_comments; } /** * Set 'leading_detached_comments' value * * @param \Protobuf\Collection $value */ public function setLeadingDetachedCommentsList(\Protobuf\Collection $value = null) { $this->leading_detached_comments = $value; } /** * Add a new element to 'leading_detached_comments' * * @param string $value */ public function addLeadingDetachedComments($value) { if ($this->leading_detached_comments === null) { $this->leading_detached_comments = new \Protobuf\ScalarCollection(); } $this->leading_detached_comments->add($value); } /** * {@inheritdoc} */ public function extensions() { if ( $this->extensions !== null) { return $this->extensions; } return $this->extensions = new \Protobuf\Extension\ExtensionFieldMap(__CLASS__); } /** * {@inheritdoc} */ public function unknownFieldSet() { return $this->unknownFieldSet; } /** * {@inheritdoc} */ public static function fromStream($stream, \Protobuf\Configuration $configuration = null) { return new self($stream, $configuration); } /** * {@inheritdoc} */ public static function fromArray(array $values) { $message = new self(); $values = array_merge([ 'path' => [], 'span' => [], 'leading_comments' => null, 'trailing_comments' => null, 'leading_detached_comments' => [] ], $values); $message->setLeadingComments($values['leading_comments']); $message->setTrailingComments($values['trailing_comments']); foreach ($values['path'] as $item) { $message->addPath($item); } foreach ($values['span'] as $item) { $message->addSpan($item); } foreach ($values['leading_detached_comments'] as $item) { $message->addLeadingDetachedComments($item); } return $message; } /** * {@inheritdoc} */ public static function descriptor() { return \google\protobuf\DescriptorProto::fromArray([ 'name' => 'Location', 'field' => [ \google\protobuf\FieldDescriptorProto::fromArray([ 'number' => 1, 'name' => 'path', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED() ]), \google\protobuf\FieldDescriptorProto::fromArray([ 'number' => 2, 'name' => 'span', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED() ]), \google\protobuf\FieldDescriptorProto::fromArray([ 'number' => 3, 'name' => 'leading_comments', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL() ]), \google\protobuf\FieldDescriptorProto::fromArray([ 'number' => 4, 'name' => 'trailing_comments', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL() ]), \google\protobuf\FieldDescriptorProto::fromArray([ 'number' => 6, 'name' => 'leading_detached_comments', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED() ]), ], ]); } /** * {@inheritdoc} */ public function toStream(\Protobuf\Configuration $configuration = null) { $config = $configuration ?: \Protobuf\Configuration::getInstance(); $context = $config->createWriteContext(); $stream = $context->getStream(); $this->writeTo($context); $stream->seek(0); return $stream; } /** * {@inheritdoc} */ public function writeTo(\Protobuf\WriteContext $context) { $stream = $context->getStream(); $writer = $context->getWriter(); $sizeContext = $context->getComputeSizeContext(); if ($this->path !== null) { $innerSize = 0; $calculator = $sizeContext->getSizeCalculator(); foreach ($this->path as $val) { $innerSize += $calculator->computeVarintSize($val); } $writer->writeVarint($stream, 10); $writer->writeVarint($stream, $innerSize); foreach ($this->path as $val) { $writer->writeVarint($stream, $val); } } if ($this->span !== null) { $innerSize = 0; $calculator = $sizeContext->getSizeCalculator(); foreach ($this->span as $val) { $innerSize += $calculator->computeVarintSize($val); } $writer->writeVarint($stream, 18); $writer->writeVarint($stream, $innerSize); foreach ($this->span as $val) { $writer->writeVarint($stream, $val); } } if ($this->leading_comments !== null) { $writer->writeVarint($stream, 26); $writer->writeString($stream, $this->leading_comments); } if ($this->trailing_comments !== null) { $writer->writeVarint($stream, 34); $writer->writeString($stream, $this->trailing_comments); } if ($this->leading_detached_comments !== null) { foreach ($this->leading_detached_comments as $val) { $writer->writeVarint($stream, 50); $writer->writeString($stream, $val); } } if ($this->extensions !== null) { $this->extensions->writeTo($context); } return $stream; } /** * {@inheritdoc} */ public function readFrom(\Protobuf\ReadContext $context) { $reader = $context->getReader(); $length = $context->getLength(); $stream = $context->getStream(); $limit = ($length !== null) ? ($stream->tell() + $length) : null; while ($limit === null || $stream->tell() < $limit) { if ($stream->eof()) { break; } $key = $reader->readVarint($stream); $wire = \Protobuf\WireFormat::getTagWireType($key); $tag = \Protobuf\WireFormat::getTagFieldNumber($key); if ($stream->eof()) { break; } if ($tag === 1) { $innerSize = $reader->readVarint($stream); $innerLimit = $stream->tell() + $innerSize; if ($this->path === null) { $this->path = new \Protobuf\ScalarCollection(); } while ($stream->tell() < $innerLimit) { $this->path->add($reader->readVarint($stream)); } continue; } if ($tag === 2) { $innerSize = $reader->readVarint($stream); $innerLimit = $stream->tell() + $innerSize; if ($this->span === null) { $this->span = new \Protobuf\ScalarCollection(); } while ($stream->tell() < $innerLimit) { $this->span->add($reader->readVarint($stream)); } continue; } if ($tag === 3) { \Protobuf\WireFormat::assertWireType($wire, 9); $this->leading_comments = $reader->readString($stream); continue; } if ($tag === 4) { \Protobuf\WireFormat::assertWireType($wire, 9); $this->trailing_comments = $reader->readString($stream); continue; } if ($tag === 6) { \Protobuf\WireFormat::assertWireType($wire, 9); if ($this->leading_detached_comments === null) { $this->leading_detached_comments = new \Protobuf\ScalarCollection(); } $this->leading_detached_comments->add($reader->readString($stream)); continue; } $extensions = $context->getExtensionRegistry(); $extension = $extensions ? $extensions->findByNumber(__CLASS__, $tag) : null; if ($extension !== null) { $this->extensions()->add($extension, $extension->readFrom($context, $wire)); continue; } if ($this->unknownFieldSet === null) { $this->unknownFieldSet = new \Protobuf\UnknownFieldSet(); } $data = $reader->readUnknown($stream, $wire); $unknown = new \Protobuf\Unknown($tag, $wire, $data); $this->unknownFieldSet->add($unknown); } } /** * {@inheritdoc} */ public function serializedSize(\Protobuf\ComputeSizeContext $context) { $calculator = $context->getSizeCalculator(); $size = 0; if ($this->path !== null) { $innerSize = 0; foreach ($this->path as $val) { $innerSize += $calculator->computeVarintSize($val); } $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->span !== null) { $innerSize = 0; foreach ($this->span as $val) { $innerSize += $calculator->computeVarintSize($val); } $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->leading_comments !== null) { $size += 1; $size += $calculator->computeStringSize($this->leading_comments); } if ($this->trailing_comments !== null) { $size += 1; $size += $calculator->computeStringSize($this->trailing_comments); } if ($this->leading_detached_comments !== null) { foreach ($this->leading_detached_comments as $val) { $size += 1; $size += $calculator->computeStringSize($val); } } if ($this->extensions !== null) { $size += $this->extensions->serializedSize($context); } return $size; } /** * {@inheritdoc} */ public function clear() { $this->path = null; $this->span = null; $this->leading_comments = null; $this->trailing_comments = null; $this->leading_detached_comments = null; } /** * {@inheritdoc} */ public function merge(\Protobuf\Message $message) { if ( ! $message instanceof \google\protobuf\SourceCodeInfo\Location) { throw new \InvalidArgumentException(sprintf('Argument 1 passed to %s must be a %s, %s given', __METHOD__, __CLASS__, get_class($message))); } $this->path = ($message->path !== null) ? $message->path : $this->path; $this->span = ($message->span !== null) ? $message->span : $this->span; $this->leading_comments = ($message->leading_comments !== null) ? $message->leading_comments : $this->leading_comments; $this->trailing_comments = ($message->trailing_comments !== null) ? $message->trailing_comments : $this->trailing_comments; $this->leading_detached_comments = ($message->leading_detached_comments !== null) ? $message->leading_detached_comments : $this->leading_detached_comments; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.24 |
proxy
|
phpinfo
|
Settings