master

laravel/framework

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

ResponsePrepared.php

TLDR

This file defines a class called ResponsePrepared in the Illuminate\Routing\Events namespace. The class has two properties - $request and $response - and a constructor method that initializes these properties.

Class ResponsePrepared

The ResponsePrepared class is responsible for representing an event where a response has been prepared. It has the following properties:

  • $request: Represents the request instance of type \Symfony\Component\HttpFoundation\Request.
  • $response: Represents the response instance of type \Symfony\Component\HttpFoundation\Response.

The class has a constructor method that takes in a request and a response as parameters and assigns them to the respective properties.

<?php

namespace Illuminate\Routing\Events;

class ResponsePrepared
{
    /**
     * The request instance.
     *
     * @var \Symfony\Component\HttpFoundation\Request
     */
    public $request;

    /**
     * The response instance.
     *
     * @var \Symfony\Component\HttpFoundation\Response
     */
    public $response;

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