public function dump($requestId, $request, $response)
    {
        if (empty($requestId)) {
            throw new \InvalidArgumentException('The request ID cannot be empty.');
        }

        $dir = $this->rootDir . '/' . substr($requestId, 0, 2) . '/' . substr($requestId, 2, 1);

        $this->ensureDirectoryExists($dir);

        $this->saveFile($dir . '/' . $requestId . '_req.data', $request);
        $this->saveFile($dir . '/' . $requestId . '_resp.data', $response);
    }
public function dump($requestId, $request, $response)
    {
        if (empty($requestId)) {
            throw new \InvalidArgumentException('The request ID cannot be empty.');
        }

        $dir = $this->rootDir . '/' . substr($requestId, 0, 2) . '/' . substr($requestId, 2, 1);

        $this->ensureDirectoryExists($dir);

        $this->saveFile($dir . '/' . $requestId . '_req.data', $request);
        $this->saveFile($dir . '/' . $requestId . '_resp.data', $response);
    }
public function dump ( $ requestId , $ request , $ response ) { if ( empty ( $ requestId ) ) { throw new \ InvalidArgumentException ( 'The request ID cannot be empty.' ) ; } $ dir = $ this -> rootDir . '/' . substr ( $ requestId , 0 , 2 ) . '/' . substr ( $ requestId , 2 , 1 ) ; $ this -> ensureDirectoryExists ( $ dir ) ; $ this -> saveFile ( $ dir . '/' . $ requestId . '_req.data' , $ request ) ; $ this -> saveFile ( $ dir . '/' . $ requestId . '_resp.data' , $ response ) ; }
Dumps data of request and response to storage.

@param string $requestId The request identifier
@param string $request   The request's content
@param string $response  The response's content

@throws \InvalidArgumentException
Dumps data of request and response to storage .