PHP Class AwsInspector\Helper\Curl

Show file Open project: aoepeople/stackformation Class Usage Examples

Protected Properties

Property Type Description
$connection AwsInspector\Ssh\Connection | AwsInspector\Ssh\LocalConnection | null
$headers array
$maxTime integer
$postData string
$responseBody string
$responseHeaders array
$responseStatus string
$url string

Public Methods

Method Description
__construct ( string $url, array $headers = [], Connection $connection = null, integer $maxTime = 5 )
doRequest ( )
getResponseBody ( ) : mixed
getResponseCode ( ) : string
getResponseHeader ( string $header ) : mixed
getResponseHeaders ( ) : array
getResponseStatus ( ) : string
setPostData ( string $postData )
setResponseCode ( string $status )

Protected Methods

Method Description
getCurlCommand ( ) : string
getCurlError ( string $exitCode ) : mixed | string
getCurleMap ( ) : array
parseHeader ( string $line )

Method Details

__construct() public method

public __construct ( string $url, array $headers = [], Connection $connection = null, integer $maxTime = 5 )
$url string
$headers array
$connection AwsInspector\Ssh\Connection
$maxTime integer

doRequest() public method

public doRequest ( )

getCurlCommand() protected method

protected getCurlCommand ( ) : string
return string

getCurlError() protected method

protected getCurlError ( string $exitCode ) : mixed | string
$exitCode string
return mixed | string

getCurleMap() protected method

protected getCurleMap ( ) : array
return array

getResponseBody() public method

public getResponseBody ( ) : mixed
return mixed

getResponseCode() public method

public getResponseCode ( ) : string
return string

getResponseHeader() public method

public getResponseHeader ( string $header ) : mixed
$header string
return mixed

getResponseHeaders() public method

public getResponseHeaders ( ) : array
return array

getResponseStatus() public method

public getResponseStatus ( ) : string
return string

parseHeader() protected method

protected parseHeader ( string $line )
$line string

setPostData() public method

public setPostData ( string $postData )
$postData string

setResponseCode() public method

public setResponseCode ( string $status )
$status string

Property Details

$connection protected property

protected Connection,AwsInspector\Ssh|LocalConnection,AwsInspector\Ssh|null $connection
return AwsInspector\Ssh\Connection | AwsInspector\Ssh\LocalConnection | null

$headers protected property

protected array $headers
return array

$maxTime protected property

protected int $maxTime
return integer

$postData protected property

protected string $postData
return string

$responseBody protected property

protected string $responseBody
return string

$responseHeaders protected property

protected array $responseHeaders
return array

$responseStatus protected property

protected string $responseStatus
return string

$url protected property

protected string $url
return string