src/Kagency/HttpReplay/Reader/MitmDump.php
public function readInteractions($file)
    {
        return array_map(
            function (array $interaction) {
                return new Interaction(
                    $this->messageHandler->convertFromRequest(
                        new SimplifiedRequest(
                            $interaction['request']['method'],
                            $interaction['request']['path'],
                            $this->mapHeaders($interaction['request']['headers']),
                            $interaction['request']['content']
                        )
                    ),
                    $this->messageHandler->convertFromResponse(
                        new SimplifiedResponse(
                            $interaction['request']['path'],
                            $interaction['response']['code'],
                            $this->mapHeaders($interaction['response']['headers']),
                            $interaction['response']['content']
                        )
                    )
                );
            },
            $this->decoder->decode(file_get_contents($file))
        );
    }
public function readInteractions($file)
    {
        return array_map(
            function (array $interaction) {
                return new Interaction(
                    $this->messageHandler->convertFromRequest(
                        new SimplifiedRequest(
                            $interaction['request']['method'],
                            $interaction['request']['path'],
                            $this->mapHeaders($interaction['request']['headers']),
                            $interaction['request']['content']
                        )
                    ),
                    $this->messageHandler->convertFromResponse(
                        new SimplifiedResponse(
                            $interaction['request']['path'],
                            $interaction['response']['code'],
                            $this->mapHeaders($interaction['response']['headers']),
                            $interaction['response']['content']
                        )
                    )
                );
            },
            $this->decoder->decode(file_get_contents($file))
        );
    }
public function readInteractions ( $ file ) { return array_map ( function ( array $ interaction ) { return new Interaction ( $ this -> messageHandler -> convertFromRequest ( new SimplifiedRequest ( $ interaction [ 'request' ] [ 'method' ] , $ interaction [ 'request' ] [ 'path' ] , $ this -> mapHeaders ( $ interaction [ 'request' ] [ 'headers' ] ) , $ interaction [ 'request' ] [ 'content' ] ) ) , $ this -> messageHandler -> convertFromResponse ( new SimplifiedResponse ( $ interaction [ 'request' ] [ 'path' ] , $ interaction [ 'response' ] [ 'code' ] , $ this -> mapHeaders ( $ interaction [ 'response' ] [ 'headers' ] ) , $ interaction [ 'response' ] [ 'content' ] ) ) ) ; } , $ this -> decoder -> decode ( file_get_contents ( $ file ) ) ) ; }
Read interactions l

@param string $file
@return Interaction[]
Read interactions l