master

laravel/framework

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

PreparingResponse.php

TLDR

This file contains the PreparingResponse class that is responsible for creating a new event instance for preparing a response in the Illuminate Routing package.

Classes

PreparingResponse

The PreparingResponse class represents an event for preparing a response in the Illuminate Routing package. It has the following properties:

  • $request: The request instance of type \Symfony\Component\HttpFoundation\Request.
  • $response: The response instance of any type.

The class has a constructor that accepts a request and a response object and assigns them to the respective properties.

<?php

namespace Illuminate\Routing\Events;

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

    /**
     * The response instance.
     *
     * @var mixed
     */
    public $response;

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