master

laravel/framework

Last updated at: 29/12/2023 09:23

ResponseReceived.php

TLDR

This file is a part of the Demo Projects project and is named ResponseReceived.php. It contains the ResponseReceived class which is an event class used in the Illuminate Http Client. The class has two public properties, $request and $response, which store the request and response instances respectively.

Classes

ResponseReceived

The ResponseReceived class is an event class that is used in the Illuminate Http Client. It has two public properties, $request and $response, which store the request and response instances respectively. The class is responsible for creating a new event instance and initializing its properties.

<?php

namespace Illuminate\Http\Client\Events;

use Illuminate\Http\Client\Request;
use Illuminate\Http\Client\Response;

class ResponseReceived
{
    /**
     * The request instance.
     *
     * @var \Illuminate\Http\Client\Request
     */
    public $request;

    /**
     * The response instance.
     *
     * @var \Illuminate\Http\Client\Response
     */
    public $response;

    /**
     * Create a new event instance.
     *
     * @param  \Illuminate\Http\Client\Request  $request
     * @param  \Illuminate\Http\Client\Response  $response
     * @return void
     */
    public function __construct(Request $request, Response $response)
    {
        $this->request = $request;
        $this->response = $response;
    }
}