Kshabazz\Interception\StreamWrappers\Http¶
- class Http¶
Class Http
- constant RESOURCE_TYPE_FILE¶
- constant RESOURCE_TYPE_SOCKET¶
- property context¶
resource
- property position¶
int
- __construct()¶
Constructor
- count()¶
- offsetExists($pKey)¶
Allow access via indices.
Parameters: - $pKey (mixed) –
Returns: bool
- offsetGet($pKey)¶
Parameters: - $pKey –
- offsetSet($pKey, $pValue)¶
Parameters: - $pKey –
- $pValue –
- offsetUnset($pKey)¶
Parameters: - $pKey (mixed) –
- stream_close()¶
Close the resource.
Returns: void
- stream_eof()¶
Returns: bool
- stream_open($pPath, $pMode, $pFlags, $pOpenedPath)¶
Open a stream resource.
Parameters: - $pPath (string) –
- $pMode (string) –
- $pFlags (int) –
- $pOpenedPath (string) –
Returns: bool
- stream_read($count)¶
Parameters: - $count (int) –
Returns: string
- stream_stat()¶
TODO: Find out why this is trigger when using file_get_contents().
Returns: array
- clearPersistSaveFile()¶
Clear the persist save filename.
Returns: bool TRUE when save file is cleared.
- clearSaveFile()¶
Clear the save file name.
Returns: bool TRUE when save file is cleared, FALSE when $saveFilePersist is TRUE.
- getSaveDir()¶
Get directory where to save raw socket data files.
Returns: string
- getSaveFilename()¶
Get save file name.
Returns: string
- persistSaveFile($pPersistFilename)¶
Allow the save file name to persist, until called with FALSE.
Parameters: - $pPersistFilename (string) –
Returns: bool Current setting.
- persistSuffix()¶
Add a suffix to the file to prevent overwriting when persisting save file.
Returns: string
- setSaveDir($pDirectory)¶
Set directory to save socket data files.
Parameters: - $pDirectory –
Returns: bool
- setSaveFilename($pFilename)¶
Set the file name for the local file.
Parameters: - $pFilename –
Returns: bool
- isValidFilename($pFilename)¶
Validate a name filename.
Parameters: - $pFilename –
Returns: bool
- buildRequest()¶
Build the request according to: http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html
- getSaveFile()¶
Get the full file path by generating one from the URL, or the one set by the developer.
Returns: bool
- populateResponseHeaders()¶
Parse the content for the headers.
- readFromSocket($pResource, $pLength = 100)¶
Parameters: - $pResource (resource) –
- $pLength (int) –
Returns: bool
- readFromResource($pCount = 100)¶
Parameters: - $pCount (int) –
Returns: bool|string
- triggerSocketError()¶
Trigger socket error.