/** * Returns the content of a specific tape without writing it to disk. * * @param string $name * * @return null|string */ public function getTapeContent($name) { $tape = $this->getTape($name); if ($tape->hasResponses()) { $content = $this->formatter->encodeResponsesCollection($tape->getResponses()); return $content; } return; }
/** * @param $content * * @return \Ikwattro\GuzzleStereo\Player */ public static function replayFromContent($content) { $formatter = new ResponseFormatter(); return new self($formatter->rebuildFromTape($content)); }