This is automatic generated document for things in Swow\Psr7\Utils\CreatorTrait class

Trait CreatorTrait

Methods

Static method createRequest

public static function createRequest ( string $method , mixed $uri , array<string, (array<string> | string)> $headers , mixed $body , ?RequestFactoryInterface $requestFactory ) : (RequestInterface | Request)

Static method createResponse

public static function createResponse ( int $code , string $reasonPhrase , array<string, (array<string> | string)> $headers , mixed $body , ?ResponseFactoryInterface $responseFactory ) : (ResponseInterface | ResponsePlusInterface | Response)

Static method createResponseFromEntity

public static function createResponseFromEntity ( ResponseEntity $responseEntity , ?ResponseFactoryInterface $responseFactory , ?StreamFactoryInterface $streamFactory ) : (ResponseInterface | ResponsePlusInterface | Response)

Static method createServerRequest

public static function createServerRequest ( string $method , mixed $uri , array<string, string> $serverParams , array<string, (array<string> | string)> $headers , mixed $body , ?ServerRequestFactoryInterface $serverRequestFactory ) : (ServerRequestInterface | ServerRequestPlusInterface | ServerRequest)

Static method createServerRequestFromEntity

public static function createServerRequestFromEntity ( ServerRequestEntity $serverRequestEntity , ?ServerRequestFactoryInterface $serverRequestFactory , ?UriFactoryInterface $uriFactory , ?StreamFactoryInterface $streamFactory , ?UploadedFileFactoryInterface $uploadedFileFactory ) : (ServerRequestInterface | ServerRequestPlusInterface | ServerRequest)

Static method createStream

public static function createStream ( string $data , ?StreamFactoryInterface $streamFactory ) : (StreamInterface | StreamPlusInterface | BufferStream)

Static method createStreamFromAny

public static function createStreamFromAny ( mixed $data , ?StreamFactoryInterface $streamFactory ) : (StreamInterface | StreamPlusInterface | BufferStream | PhpStream)

Static method createStreamFromBuffer

public static function createStreamFromBuffer ( Buffer $buffer , ?StreamFactoryInterface $streamFactory ) : (StreamInterface | StreamPlusInterface | BufferStream)

Static method createUploadedFilesFromEntity

public static function createUploadedFilesFromEntity ( array<UploadedFileEntity> $uploadedFileEntities , ?StreamFactoryInterface $streamFactory , ?UploadedFileFactoryInterface $uploadedFileFactory ) : array<(UploadedFileInterface | UploadedFilePlusInterface | UploadedFile)>

Static method createUriFromString

public static function createUriFromString ( string $uri , ?UriFactoryInterface $uriFactory ) : (UriInterface | UriPlusInterface | Uri)

Static method createWebSocketBinaryFrame

public static function createWebSocketBinaryFrame ( mixed $payloadData , bool $fin , bool|string $mask ) : WebSocketFrame

Static method createWebSocketBinaryMaskedFrame

public static function createWebSocketBinaryMaskedFrame ( mixed $payloadData , bool $fin ) : WebSocketFrame

Static method createWebSocketFrame

public static function createWebSocketFrame ( int $opcode , mixed $payloadData , bool $fin , bool|string $mask ) : WebSocketFrame

Static method createWebSocketTextFrame

public static function createWebSocketTextFrame ( mixed $payloadData , bool $fin , bool|string $mask ) : WebSocketFrame

Static method createWebSocketTextMaskedFrame

public static function createWebSocketTextMaskedFrame ( mixed $payloadData , bool $fin ) : WebSocketFrame

Copyright 2022 the Swow contributors