PHP Class Ikwattro\GuzzleStereo\Recorder

Show file Open project: ikwattro/guzzle-stereo Class Usage Examples

Protected Properties

Property Type Description
$config null | array
$formatter Ikwattro\GuzzleStereo\Formatter\ResponseFormatter
$mixer
$storeDirectory string
$tapes Ikwattro\GuzzleStereo\Record\Tape[]
$writer Ikwattro\GuzzleStereo\Store\Writer

Public Methods

Method Description
__construct ( string $storeDirectory, null | string $configurationFile = null )
addTape ( Ikwattro\GuzzleStereo\Record\Tape $tape )
dump ( ) Dumps the tapes on disk.
getConfig ( ) : null | array
getResponseFormatter ( ) : ResponseFormatter
getStore ( ) : null | string
getTape ( string $name ) : Ikwattro\GuzzleStereo\Record\Tape
getTapeContent ( string $name ) : null | string Returns the content of a specific tape without writing it to disk.
getTapes ( ) : Ikwattro\GuzzleStereo\Record\Tape[]
getWriter ( ) : Writer
loadConfig ( string $configurationFile )
record ( Psr\Http\Message\ResponseInterface $response )

Private Methods

Method Description
processConfig ( ) Process configuration for registering tapes and filters.

Method Details

__construct() public method

public __construct ( string $storeDirectory, null | string $configurationFile = null )
$storeDirectory string
$configurationFile null | string

addTape() public method

public addTape ( Ikwattro\GuzzleStereo\Record\Tape $tape )
$tape Ikwattro\GuzzleStereo\Record\Tape

dump() public method

Dumps the tapes on disk.
public dump ( )

getConfig() public method

public getConfig ( ) : null | array
return null | array

getResponseFormatter() public method

public getResponseFormatter ( ) : ResponseFormatter
return Ikwattro\GuzzleStereo\Formatter\ResponseFormatter

getStore() public method

public getStore ( ) : null | string
return null | string

getTape() public method

public getTape ( string $name ) : Ikwattro\GuzzleStereo\Record\Tape
$name string
return Ikwattro\GuzzleStereo\Record\Tape

getTapeContent() public method

Returns the content of a specific tape without writing it to disk.
public getTapeContent ( string $name ) : null | string
$name string
return null | string

getTapes() public method

public getTapes ( ) : Ikwattro\GuzzleStereo\Record\Tape[]
return Ikwattro\GuzzleStereo\Record\Tape[]

getWriter() public method

public getWriter ( ) : Writer
return Ikwattro\GuzzleStereo\Store\Writer

loadConfig() public method

public loadConfig ( string $configurationFile )
$configurationFile string

record() public method

public record ( Psr\Http\Message\ResponseInterface $response )
$response Psr\Http\Message\ResponseInterface

Property Details

$config protected property

protected null|array $config
return null | array

$formatter protected property

protected ResponseFormatter,Ikwattro\GuzzleStereo\Formatter $formatter
return Ikwattro\GuzzleStereo\Formatter\ResponseFormatter

$mixer protected property

protected $mixer

$storeDirectory protected property

protected string $storeDirectory
return string

$tapes protected property

protected Tape[],Ikwattro\GuzzleStereo\Record $tapes
return Ikwattro\GuzzleStereo\Record\Tape[]

$writer protected property

protected Writer,Ikwattro\GuzzleStereo\Store $writer
return Ikwattro\GuzzleStereo\Store\Writer