OpenTelemetry PHP

StreamTransportFactory
in package
implements TransportFactoryInterface

FinalYes
Tags
psalm-internal

\OpenTelemetry

Table of Contents

Interfaces

TransportFactoryInterface

Methods

create()  : TransportInterface
createHeaderArray()  : array<string|int, mixed>
createStream()  : resource

Methods

create()

public create(string|resource $endpoint, string $contentType[, array<string, string|array<string|int, string>> $headers = [] ][, string|array<string|int, string>|null $compression = null ][, float $timeout = 10.0 ][, int $retryDelay = 100 ][, int $maxRetries = 3 ][, string|null $cacert = null ][, string|null $cert = null ][, string|null $key = null ]) : TransportInterface
Parameters
$endpoint : string|resource
$contentType : string
$headers : array<string, string|array<string|int, string>> = []
$compression : string|array<string|int, string>|null = null
$timeout : float = 10.0
$retryDelay : int = 100
$maxRetries : int = 3
$cacert : string|null = null
$cert : string|null = null
$key : string|null = null
Tags
psalm-template

CONTENT_TYPE of string

psalm-param

CONTENT_TYPE $contentType

psalm-return

TransportInterface<CONTENT_TYPE>

throws
ErrorException
Return values
TransportInterface

createHeaderArray()

private static createHeaderArray(string $contentType, array<string|int, mixed> $headers) : array<string|int, mixed>
Parameters
$contentType : string
$headers : array<string|int, mixed>
Return values
array<string|int, mixed>

createStream()

private static createStream(string $endpoint, string $contentType[, array<string|int, mixed> $headers = [] ][, float $timeout = 10.0 ][, string|null $cacert = null ][, string|null $cert = null ][, string|null $key = null ]) : resource
Parameters
$endpoint : string
$contentType : string
$headers : array<string|int, mixed> = []
$timeout : float = 10.0
$cacert : string|null = null
$cert : string|null = null
$key : string|null = null
Tags
throws
ErrorException
Return values
resource

        
On this page

Search results