Parse PHP SDK API Reference

ParseStream
in package

Class ParseStream - Wrapper for abstracted stream usage

Tags
author

Ben Friedman [email protected]

Table of Contents

$errorCode  : int
Error code
$errorMessage  : string
Error message
$responseHeaders  : array<string|int, mixed>|null
Response headers
$stream  : resource
Stream context
createContext()  : mixed
Create a stream context
get()  : string
Gets the contents from the given url
getErrorCode()  : int
Get the current error code
getErrorMessage()  : string
Gets the current error message
getFileContents()  : mixed
Wrapper for file_get_contents, used for testing
getResponseHeaders()  : array<string|int, mixed>
Returns the response headers for the last request

Properties

$errorMessage

Error message

private string $errorMessage

$responseHeaders

Response headers

private array<string|int, mixed>|null $responseHeaders

Methods

createContext()

Create a stream context

public createContext(array<string|int, mixed> $options) : mixed
Parameters
$options : array<string|int, mixed>

Options to pass to our context

Return values
mixed

get()

Gets the contents from the given url

public get(string $url) : string
Parameters
$url : string

Url to get contents of

Return values
string

getErrorCode()

Get the current error code

public getErrorCode() : int
Return values
int

getErrorMessage()

Gets the current error message

public getErrorMessage() : string
Return values
string

getFileContents()

Wrapper for file_get_contents, used for testing

public getFileContents(mixed $filename, mixed $use_include_path, mixed $context) : mixed
Parameters
$filename : mixed
$use_include_path : mixed
$context : mixed
Return values
mixed

getResponseHeaders()

Returns the response headers for the last request

public getResponseHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results