PHP 클래스 Airship\Engine\Hail

Abstracts away the network communications; silently enforces configuration (e.g. tor-only mode).
파일 보기 프로젝트 열기: paragonie/airship 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$client Client
$supplierCache Airship\Engine\Continuum\Supplier[]

공개 메소드들

메소드 설명
__construct ( ClientInterface $client )
__debugInfo ( ) : array
downloadFile ( string $url, string $filename, array $params = [] ) : Psr\Http\Message\ResponseInterface Download a file over the Internet
get ( string $url, array $params = [] ) : Psr\Http\Message\ResponseInterface Perform a GET request
getAsync ( string $url, array $params = [] ) : Psr\Http\Message\ResponseInterface Perform a GET request, asynchronously
getJSON ( string $url, array $params = [] ) : mixed Perform a GET request, get a decoded JSON response.
getReturnBody ( string $url, array $params = [] ) : string Perform a POST request, get the body
getSignedJSON ( string $url, SignaturePublicKey $publicKey, array $params = [] ) : mixed Perform a GET request, get a decoded JSON response.
params ( array $params = [], string $url = '' ) : array Make sure we include the default params
parseJSON ( Response $response ) : mixed Parse a signed JSON response
parseSignedJSON ( Response $response, SignaturePublicKey $publicKey ) : mixed Parse a signed JSON response
post ( string $url, array $params = [] ) : Psr\Http\Message\ResponseInterface Perform a POST request
postAsync ( string $url, array $params = [] ) : Psr\Http\Message\ResponseInterface Perform a GET request, asynchronously
postJSON ( string $url, array $params = [] ) : mixed Perform a POST request, get a decoded JSON response.
postReturnBody ( string $url, array $params = [] ) : string Perform a POST request, get the body
postSignedJSON ( string $url, SignaturePublicKey $publicKey, array $params = [] ) : mixed Perform a POST request, get a decoded JSON response.

메소드 상세

__construct() 공개 메소드

public __construct ( ClientInterface $client )
$client ClientInterface

__debugInfo() 공개 메소드

public __debugInfo ( ) : array
리턴 array

downloadFile() 공개 메소드

Download a file over the Internet
public downloadFile ( string $url, string $filename, array $params = [] ) : Psr\Http\Message\ResponseInterface
$url string - the URL to request
$filename string - the name of the local file path
$params array
리턴 Psr\Http\Message\ResponseInterface

get() 공개 메소드

Perform a GET request
public get ( string $url, array $params = [] ) : Psr\Http\Message\ResponseInterface
$url string
$params array
리턴 Psr\Http\Message\ResponseInterface

getAsync() 공개 메소드

Perform a GET request, asynchronously
public getAsync ( string $url, array $params = [] ) : Psr\Http\Message\ResponseInterface
$url string
$params array
리턴 Psr\Http\Message\ResponseInterface

getJSON() 공개 메소드

Perform a GET request, get a decoded JSON response.
public getJSON ( string $url, array $params = [] ) : mixed
$url string
$params array
리턴 mixed

getReturnBody() 공개 메소드

Perform a POST request, get the body
public getReturnBody ( string $url, array $params = [] ) : string
$url string
$params array
리턴 string

getSignedJSON() 공개 메소드

Internally verifies an Ed25519 signature.
public getSignedJSON ( string $url, SignaturePublicKey $publicKey, array $params = [] ) : mixed
$url string
$publicKey SignaturePublicKey
$params array
리턴 mixed

params() 공개 메소드

Make sure we include the default params
public params ( array $params = [], string $url = '' ) : array
$params array
$url string (used for decision-making)
리턴 array

parseJSON() 공개 메소드

Parse a signed JSON response
public parseJSON ( Response $response ) : mixed
$response Response
리턴 mixed

parseSignedJSON() 공개 메소드

Parse a signed JSON response
public parseSignedJSON ( Response $response, SignaturePublicKey $publicKey ) : mixed
$response Response
$publicKey SignaturePublicKey
리턴 mixed

post() 공개 메소드

Perform a POST request
public post ( string $url, array $params = [] ) : Psr\Http\Message\ResponseInterface
$url string
$params array
리턴 Psr\Http\Message\ResponseInterface

postAsync() 공개 메소드

Perform a GET request, asynchronously
public postAsync ( string $url, array $params = [] ) : Psr\Http\Message\ResponseInterface
$url string
$params array
리턴 Psr\Http\Message\ResponseInterface

postJSON() 공개 메소드

Perform a POST request, get a decoded JSON response.
public postJSON ( string $url, array $params = [] ) : mixed
$url string
$params array
리턴 mixed

postReturnBody() 공개 메소드

Perform a POST request, get the body
public postReturnBody ( string $url, array $params = [] ) : string
$url string
$params array
리턴 string

postSignedJSON() 공개 메소드

Internally verifies an Ed25519 signature.
public postSignedJSON ( string $url, SignaturePublicKey $publicKey, array $params = [] ) : mixed
$url string
$publicKey SignaturePublicKey
$params array
리턴 mixed

프로퍼티 상세

$client 보호되어 있는 프로퍼티

protected Client $client
리턴 Client

$supplierCache 보호되어 있는 프로퍼티

protected Supplier[],Airship\Engine\Continuum $supplierCache
리턴 Airship\Engine\Continuum\Supplier[]