master

laravel/framework

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

SchemaDumped.php

TLDR

This file defines the SchemaDumped class in the namespace Illuminate\Database\Events. It is used to create an event instance when a schema is dumped.

Classes

SchemaDumped

The SchemaDumped class represents an event instance that is created when a schema is dumped. It has the following properties:

  • connection: The database connection instance. (Type: \Illuminate\Database\Connection)
  • connectionName: The name of the database connection. (Type: string)
  • path: The path to the schema dump. (Type: string)

The SchemaDumped class has a constructor that accepts two parameters:

  • $connection: The database connection instance. (Type: \Illuminate\Database\Connection)
  • $path: The path to the schema dump. (Type: string)

Note: There are no methods in this file.

<?php

namespace Illuminate\Database\Events;

class SchemaDumped
{
    /**
     * The database connection instance.
     *
     * @var \Illuminate\Database\Connection
     */
    public $connection;

    /**
     * The database connection name.
     *
     * @var string
     */
    public $connectionName;

    /**
     * The path to the schema dump.
     *
     * @var string
     */
    public $path;

    /**
     * Create a new event instance.
     *
     * @param  \Illuminate\Database\Connection  $connection
     * @param  string  $path
     * @return void
     */
    public function __construct($connection, $path)
    {
        $this->connection = $connection;
        $this->connectionName = $connection->getName();
        $this->path = $path;
    }
}