PHP Class VCR\Util\StreamHelper

Afficher le fichier Open project: php-vcr/php-vcr Class Usage Examples

Méthodes publiques

Méthode Description
createRequestFromStreamContext ( resource $context, string $path, Request $existing = null ) : Request Returns a Request from specified stream context and path.

Méthodes protégées

Méthode Description
getHttpOptionsFromContext ( $context ) : array Returns HTTP options from current stream context.

Method Details

createRequestFromStreamContext() public static méthode

If an existing Request is given, the stream context options are set on the specified Request object.
public static createRequestFromStreamContext ( resource $context, string $path, Request $existing = null ) : Request
$context resource Stream context resource.
$path string Path to use as url.
$existing VCR\Request Optional, existing request.
Résultat VCR\Request

getHttpOptionsFromContext() protected static méthode

Returns HTTP options from current stream context.
See also: http://php.net/manual/en/context.http.php
protected static getHttpOptionsFromContext ( $context ) : array
Résultat array HTTP options.