Lines Matching refs:transport
26 * Construct transport.
51 * Executes the transport request.
81 * Create a transport.
83 * The $transport parameter can be one of the following values:
85 * * string: The short name of a transport. For instance "Http"
86 * * object: An already instantiated instance of a transport
88 * keys in the array will be set as parameters in the transport instance
90 * @param AbstractTransport|array<string, mixed>|string $transport A transport definition
92 * @param array<string, mixed> $params Parameters for the transport class
96 public static function create($transport, Connection $connection, array $params = []): AbstractTransport
98 if (\is_array($transport) && isset($transport['type'])) {
99 $transportParams = $transport;
103 $transport = $transport['type'];
106 if (\is_string($transport)) {
112 $transport = $specialTransports[\strtolower($transport)] ?? \ucfirst($transport);
113 $classNames = ["Elastica\\Transport\\{$transport}", $transport];
116 $transport = new $className();
122 if ($transport instanceof self) {
123 $transport->setConnection($connection);
126 $transport->setParam($key, $value);
129 throw new InvalidException('Invalid transport');
132 return $transport;