src/VCR/Videorecorder.php
public function insertCassette($cassetteName)
    {
        Assertion::true($this->isOn, 'Please turn on VCR before inserting a cassette, use: VCR::turnOn().');

        if (!is_null($this->cassette)) {
            $this->eject();
        }

        $storage = $this->factory->get('Storage', array($cassetteName));

        $this->cassette = new Cassette($cassetteName, $this->config, $storage);
        $this->enableLibraryHooks();
    }
public function insertCassette($cassetteName)
    {
        Assertion::true($this->isOn, 'Please turn on VCR before inserting a cassette, use: VCR::turnOn().');

        if (!is_null($this->cassette)) {
            $this->eject();
        }

        $storage = $this->factory->get('Storage', array($cassetteName));

        $this->cassette = new Cassette($cassetteName, $this->config, $storage);
        $this->enableLibraryHooks();
    }
public function insertCassette ( $ cassetteName ) { Assertion :: true ( $ this -> isOn , 'Please turn on VCR before inserting a cassette, use: VCR::turnOn().' ) ; if ( ! is_null ( $ this -> cassette ) ) { $ this -> eject ( ) ; } $ storage = $ this -> factory -> get ( 'Storage' , array ( $ cassetteName ) ) ; $ this -> cassette = new Cassette ( $ cassetteName , $ this -> config , $ storage ) ; $ this -> enableLibraryHooks ( ) ; }
Inserts a cassette to record responses and requests on.

@api

@param string $cassetteName Name of the cassette (used for the cassette filename).

@return void
@throws VCRException If videorecorder is turned off when inserting a cassette.
Inserts a cassette to record responses and requests on .