Property | Type | Description | |
---|---|---|---|
$cassette | Cassette on which to store requests and responses. | ||
$client | Client to use to issue HTTP requests. | ||
$config | Config options like which library hooks to use. | ||
$eventDispatcher | Symfony\Component\EventDispatcher\EventDispatcherInterface | ||
$factory | Factory which can create instances and resolve dependencies. | ||
$isOn | Flag if this videorecorder is turned on or not. |
Method | Description | |
---|---|---|
__construct ( |
Creates a videorecorder instance. | |
__destruct ( ) | Turns off this videorecorder when instance is destroyed. | |
configure ( ) : |
Returns the current Configuration for this videorecorder. | |
eject ( ) : void | Eject the currently inserted cassette. | |
getEventDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface | ||
handleRequest ( |
Records, sends or plays back a intercepted request. | |
insertCassette ( string $cassetteName ) : void | Inserts a cassette to record responses and requests on. | |
setEventDispatcher ( Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher ) | ||
turnOff ( ) : void | Turns off this videorecorder. | |
turnOn ( ) : void | Turns on this videorecorder. |
Method | Description | |
---|---|---|
disableLibraryHooks ( ) : void | Disables all library hooks. | |
enableLibraryHooks ( ) : void | Enables configured library hooks. |
Method | Description | |
---|---|---|
dispatch ( string $eventName, Symfony\Component\EventDispatcher\Event $event = null ) : Symfony\Component\EventDispatcher\Event | Dispatches an event to all registered listeners. |
public __construct ( |
||
$config | Config options like which library hooks to use. | |
$client | VCR\Util\HttpClient | Client which is used to issue HTTP requests. |
$factory | vcr\VCRFactory | Factory which can create instances and resolve dependencies. |
public __destruct ( ) |
public configure ( ) : |
||
return | Configuration for this videorecorder. |
protected disableLibraryHooks ( ) : void | ||
return | void |
protected enableLibraryHooks ( ) : void | ||
return | void |
public getEventDispatcher ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface | ||
return | Symfony\Component\EventDispatcher\EventDispatcherInterface |
public handleRequest ( |
||
$request | Intercepted request. | |
return | Response for the intercepted request. |
public insertCassette ( string $cassetteName ) : void | ||
$cassetteName | string | Name of the cassette (used for the cassette filename). |
return | void |
public setEventDispatcher ( Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher ) | ||
$dispatcher | Symfony\Component\EventDispatcher\EventDispatcherInterface |
protected $cassette |
protected EventDispatcherInterface,Symfony\Component\EventDispatcher $eventDispatcher | ||
return | Symfony\Component\EventDispatcher\EventDispatcherInterface |
protected $factory |