This commit is contained in:
2024-07-03 14:41:15 +03:00
commit ec69208f05
1892 changed files with 181728 additions and 0 deletions

View File

@ -0,0 +1,32 @@
<?php
namespace Illuminate\Database\Events;
abstract class ConnectionEvent
{
/**
* The name of the connection.
*
* @var string
*/
public $connectionName;
/**
* The database connection instance.
*
* @var \Illuminate\Database\Connection
*/
public $connection;
/**
* Create a new event instance.
*
* @param \Illuminate\Database\Connection $connection
* @return void
*/
public function __construct($connection)
{
$this->connection = $connection;
$this->connectionName = $connection->getName();
}
}

View File

@ -0,0 +1,8 @@
<?php
namespace Illuminate\Database\Events;
class MigrationEnded extends MigrationEvent
{
//
}

View File

@ -0,0 +1,36 @@
<?php
namespace Illuminate\Database\Events;
use Illuminate\Contracts\Database\Events\MigrationEvent as MigrationEventContract;
use Illuminate\Database\Migrations\Migration;
abstract class MigrationEvent implements MigrationEventContract
{
/**
* An migration instance.
*
* @var \Illuminate\Database\Migrations\Migration
*/
public $migration;
/**
* The migration method that was called.
*
* @var string
*/
public $method;
/**
* Create a new event instance.
*
* @param \Illuminate\Database\Migrations\Migration $migration
* @param string $method
* @return void
*/
public function __construct(Migration $migration, $method)
{
$this->method = $method;
$this->migration = $migration;
}
}

View File

@ -0,0 +1,8 @@
<?php
namespace Illuminate\Database\Events;
class MigrationStarted extends MigrationEvent
{
//
}

View File

@ -0,0 +1,10 @@
<?php
namespace Illuminate\Database\Events;
use Illuminate\Contracts\Database\Events\MigrationEvent as MigrationEventContract;
class MigrationsEnded implements MigrationEventContract
{
//
}

View File

@ -0,0 +1,10 @@
<?php
namespace Illuminate\Database\Events;
use Illuminate\Contracts\Database\Events\MigrationEvent as MigrationEventContract;
class MigrationsStarted implements MigrationEventContract
{
//
}

View File

@ -0,0 +1,24 @@
<?php
namespace Illuminate\Database\Events;
class NoPendingMigrations
{
/**
* The migration method that was called.
*
* @var string
*/
public $method;
/**
* Create a new event instance.
*
* @param string $method
* @return void
*/
public function __construct($method)
{
$this->method = $method;
}
}

View File

@ -0,0 +1,59 @@
<?php
namespace Illuminate\Database\Events;
class QueryExecuted
{
/**
* The SQL query that was executed.
*
* @var string
*/
public $sql;
/**
* The array of query bindings.
*
* @var array
*/
public $bindings;
/**
* The number of milliseconds it took to execute the query.
*
* @var float
*/
public $time;
/**
* The database connection instance.
*
* @var \Illuminate\Database\Connection
*/
public $connection;
/**
* The database connection name.
*
* @var string
*/
public $connectionName;
/**
* Create a new event instance.
*
* @param string $sql
* @param array $bindings
* @param float|null $time
* @param \Illuminate\Database\Connection $connection
* @return void
*/
public function __construct($sql, $bindings, $time, $connection)
{
$this->sql = $sql;
$this->time = $time;
$this->bindings = $bindings;
$this->connection = $connection;
$this->connectionName = $connection->getName();
}
}

View File

@ -0,0 +1,33 @@
<?php
namespace Illuminate\Database\Events;
class StatementPrepared
{
/**
* The database connection instance.
*
* @var \Illuminate\Database\Connection
*/
public $connection;
/**
* The PDO statement.
*
* @var \PDOStatement
*/
public $statement;
/**
* Create a new event instance.
*
* @param \Illuminate\Database\Connection $connection
* @param \PDOStatement $statement
* @return void
*/
public function __construct($connection, $statement)
{
$this->statement = $statement;
$this->connection = $connection;
}
}

View File

@ -0,0 +1,8 @@
<?php
namespace Illuminate\Database\Events;
class TransactionBeginning extends ConnectionEvent
{
//
}

View File

@ -0,0 +1,8 @@
<?php
namespace Illuminate\Database\Events;
class TransactionCommitted extends ConnectionEvent
{
//
}

View File

@ -0,0 +1,8 @@
<?php
namespace Illuminate\Database\Events;
class TransactionRolledBack extends ConnectionEvent
{
//
}