Property | Type | Description | |
---|---|---|---|
$context | The current context, or NULL if no context was passed to the caller function. |
Property | Type | Description | |
---|---|---|---|
$codeTransformers | VCR\CodeTransform\AbstractCodeTransform[] | Transformers which have been appended to this stream processor. | |
$configuration | |||
$isIntercepting | boolean | ||
$resource | Resource for the currently opened file. |
Method | Description | |
---|---|---|
__construct ( |
||
appendCodeTransformer ( VCR\CodeTransform\AbstractCodeTransform $codeTransformer ) : void | Adds code transformer to the stream processor. | |
detachCodeTransformer ( VCR\CodeTransform\AbstractCodeTransform $codeTransformer ) : void | Removes a code transformer from the stream processor. | |
dir_closedir ( ) : boolean | Close directory handle. | |
dir_opendir ( string $path ) : boolean | Open directory handle. | |
dir_readdir ( ) : mixed | Read entry from directory handle. | |
dir_rewinddir ( ) : boolean | Rewind directory handle. | |
intercept ( ) : void | Registers current class as the PHP file stream wrapper. | |
mkdir ( string $path, integer $mode, integer $options ) : boolean | Create a directory. | |
rename ( string $path_from, string $path_to ) : boolean | Renames a file or directory. | |
restore ( ) : void | Restores the original file stream wrapper status. | |
rmdir ( string $path ) : boolean | Removes a directory | |
stream_cast ( integer $cast_as ) : resource | Retrieve the underlaying resource. | |
stream_close ( ) : boolean | Close an resource. | |
stream_eof ( ) : boolean | Tests for end-of-file on a file pointer. | |
stream_flush ( ) : boolean | Flushes the output. | |
stream_lock ( integer $operation ) : boolean | Advisory file locking. | |
stream_metadata ( string $path, integer $option, mixed $value ) : boolean | Change stream options. | |
stream_open ( string $path, string $mode, integer $options, string &$openedPath ) : boolean | Opens a stream and attaches registered filters. | |
stream_read ( integer $count ) : string | Read from stream. | |
stream_seek ( integer $offset, integer $whence = SEEK_SET ) : boolean | Seeks to specific location in a stream. | |
stream_set_option ( integer $option, integer $arg1, integer $arg2 ) : boolean | Change stream options. | |
stream_stat ( ) : array | Retrieve information about a file resource. | |
stream_tell ( ) : integer | Retrieve the current position of a stream. | |
stream_truncate ( integer $new_size ) : boolean | Truncate stream. | |
stream_write ( string $data ) : integer | Write to stream. | |
unlink ( string $path ) : boolean | Delete a file. | |
url_stat ( string $path, integer $flags ) : integer | Retrieve information about a file. |
Method | Description | |
---|---|---|
appendFiltersToStream ( resource $stream ) | Appends the current set of php_user_filter to the provided stream. | |
isBlacklisted ( string $uri ) : boolean | Determines that the provided url is member of a url blacklist. | |
isPhpFile ( string $uri ) : boolean | Determines that the provided uri leads to a PHP file. | |
isWhitelisted ( string $uri ) : boolean | Determines that the provided url is member of a url whitelist. | |
shouldProcess ( string $uri ) : boolean |
Method | Description | |
---|---|---|
normalizePath ( string $path ) : string | Normalizes the path, to always use the slash as directory separator. |
public __construct ( |
||
$configuration |
public appendCodeTransformer ( VCR\CodeTransform\AbstractCodeTransform $codeTransformer ) : void | ||
$codeTransformer | VCR\CodeTransform\AbstractCodeTransform | |
return | void |
protected appendFiltersToStream ( resource $stream ) | ||
$stream | resource |
public detachCodeTransformer ( VCR\CodeTransform\AbstractCodeTransform $codeTransformer ) : void | ||
$codeTransformer | VCR\CodeTransform\AbstractCodeTransform | |
return | void |
public dir_closedir ( ) : boolean | ||
return | boolean | Returns TRUE on success or FALSE on failure. |
public dir_opendir ( string $path ) : boolean | ||
$path | string | The file path or URL to stat. |
return | boolean | Returns TRUE on success or FALSE on failure. |
public dir_readdir ( ) : mixed | ||
return | mixed | Should return string representing the next filename, or FALSE if there is no next file. |
public dir_rewinddir ( ) : boolean | ||
return | boolean | Returns TRUE on success or FALSE on failure. |
protected isBlacklisted ( string $uri ) : boolean | ||
$uri | string | |
return | boolean | True if the provided url is blacklisted, false otherwise. |
protected isWhitelisted ( string $uri ) : boolean | ||
$uri | string | |
return | boolean | True if the specified url is whitelisted, false otherwise. |
protected shouldProcess ( string $uri ) : boolean | ||
$uri | string | |
return | boolean |
public stream_cast ( integer $cast_as ) : resource | ||
$cast_as | integer | Can be STREAM_CAST_FOR_SELECT when stream_select() is calling stream_cast() or STREAM_CAST_AS_STREAM when stream_cast() is called for other uses. |
return | resource | Should return the underlying stream resource used by the wrapper, or FALSE. |
public stream_eof ( ) : boolean | ||
return | boolean | Should return TRUE if the read/write position is at the end of the stream and if no more data is available to be read, or FALSE otherwise. |
public stream_lock ( integer $operation ) : boolean | ||
$operation | integer | One of the operation constantes. |
return | boolean | Returns TRUE on success or FALSE on failure. |
public stream_open ( string $path, string $mode, integer $options, string &$openedPath ) : boolean | ||
$path | string | Specifies the URL that was passed to the original function. |
$mode | string | The mode used to open the file, as detailed for fopen(). |
$options | integer | Holds additional flags set by the streams API. It can hold one or more of the following values OR'd together. |
$openedPath | string | If the path is opened successfully, and STREAM_USE_PATH is set in options, opened_path should be set to the full path of the file/resource that was actually opened. |
return | boolean | Returns TRUE on success or FALSE on failure. |
public stream_read ( integer $count ) : string | ||
$count | integer | How many bytes of data from the current position should be returned. |
return | string | If there are less than count bytes available, return as many as are available. If no more data is available, return either FALSE or an empty string. |
public stream_seek ( integer $offset, integer $whence = SEEK_SET ) : boolean | ||
$offset | integer | The stream offset to seek to. |
$whence | integer | Possible values: SEEK_SET - Set position equal to offset bytes. SEEK_CUR - Set position to current location plus offset. SEEK_END - Set position to end-of-file plus offset. |
return | boolean | Return TRUE if the position was updated, FALSE otherwise. |
public stream_set_option ( integer $option, integer $arg1, integer $arg2 ) : boolean | ||
$option | integer | One of STREAM_OPTION_BLOCKING, STREAM_OPTION_READ_TIMEOUT, STREAM_OPTION_WRITE_BUFFER. |
$arg1 | integer | Depending on option. |
$arg2 | integer | Depending on option. |
return | boolean | Returns TRUE on success or FALSE on failure. If option is not implemented, FALSE should be returned. |
public stream_stat ( ) : array | ||
return | array | See stat(). |
public stream_tell ( ) : integer | ||
return | integer | Should return the current position of the stream. |
public stream_truncate ( integer $new_size ) : boolean | ||
$new_size | integer | The new size. |
return | boolean | Returns TRUE on success or FALSE on failure. |
public stream_write ( string $data ) : integer | ||
$data | string | Should be stored into the underlying stream. |
return | integer |
protected static AbstractCodeTransform[],VCR\CodeTransform $codeTransformers | ||
return | VCR\CodeTransform\AbstractCodeTransform[] |
protected static Configuration,VCR $configuration | ||
return |
public $context |