summaryrefslogtreecommitdiff
path: root/vendor/opentracing/opentracing/src/OpenTracing/Reference.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-10-20 17:12:29 +0300
committerAndrew Dolgov <[email protected]>2023-10-20 21:13:39 +0300
commitcdd7ad020e165fe680703b6d3319b908b682fb7a (patch)
treeb51eb09b7b4587e8fbc5624ac8d88d28cfcd0b04 /vendor/opentracing/opentracing/src/OpenTracing/Reference.php
parent45a9ff0c88cbd33892ff16ab837e9059937d656e (diff)
jaeger-client -> opentelemetry
Diffstat (limited to 'vendor/opentracing/opentracing/src/OpenTracing/Reference.php')
-rw-r--r--vendor/opentracing/opentracing/src/OpenTracing/Reference.php77
1 files changed, 0 insertions, 77 deletions
diff --git a/vendor/opentracing/opentracing/src/OpenTracing/Reference.php b/vendor/opentracing/opentracing/src/OpenTracing/Reference.php
deleted file mode 100644
index 7dadf1785..000000000
--- a/vendor/opentracing/opentracing/src/OpenTracing/Reference.php
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace OpenTracing;
-
-use OpenTracing\InvalidReferenceArgumentException;
-
-final class Reference
-{
- /**
- * A Span may be the ChildOf a parent Span. In a ChildOf reference,
- * the parent Span depends on the child Span in some capacity.
- */
- public const CHILD_OF = 'child_of';
-
- /**
- * Some parent Spans do not depend in any way on the result of their
- * child Spans. In these cases, we say merely that the child Span
- * FollowsFrom the parent Span in a causal sense.
- */
- public const FOLLOWS_FROM = 'follows_from';
-
- /**
- * @var string
- */
- private $type;
-
- /**
- * @var SpanContext
- */
- private $spanContext;
-
- /**
- * @param string $type
- * @param SpanContext $spanContext
- */
- public function __construct(string $type, SpanContext $spanContext)
- {
- if (empty($type)) {
- throw InvalidReferenceArgumentException::forEmptyType();
- }
-
- $this->type = $type;
- $this->spanContext = $spanContext;
- }
-
- /**
- * @param string $type
- * @param Span $span
- * @return Reference when context is invalid
- * @throws InvalidReferenceArgumentException on empty type
- */
- public static function createForSpan(string $type, Span $span): Reference
- {
- return new self($type, $span->getContext());
- }
-
- /**
- * @return SpanContext
- */
- public function getSpanContext(): SpanContext
- {
- return $this->spanContext;
- }
-
- /**
- * Checks whether a Reference is of one type.
- *
- * @param string $type the type for the reference
- * @return bool
- */
- public function isType(string $type): bool
- {
- return $this->type === $type;
- }
-}