init
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
class ConnectionEstablished extends ConnectionEvent
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
class DatabaseBusy
|
||||
{
|
||||
/**
|
||||
* The database connection name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $connectionName;
|
||||
|
||||
/**
|
||||
* The number of open connections.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $connections;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param string $connectionName
|
||||
* @param int $connections
|
||||
*/
|
||||
public function __construct($connectionName, $connections)
|
||||
{
|
||||
$this->connectionName = $connectionName;
|
||||
$this->connections = $connections;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
use Illuminate\Contracts\Database\Events\MigrationEvent as MigrationEventContract;
|
||||
|
||||
class DatabaseRefreshed implements MigrationEventContract
|
||||
{
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param string|null $database
|
||||
* @param bool $seeding
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
public ?string $database = null,
|
||||
public bool $seeding = false,
|
||||
) {
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
class MigrationEnded extends MigrationEvent
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
/**
|
||||
* A 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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
class MigrationStarted extends MigrationEvent
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
class MigrationsEnded extends MigrationsEvent
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
use Illuminate\Contracts\Database\Events\MigrationEvent as MigrationEventContract;
|
||||
|
||||
abstract class MigrationsEvent implements MigrationEventContract
|
||||
{
|
||||
/**
|
||||
* The migration method that was invoked.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $method;
|
||||
|
||||
/**
|
||||
* The options provided when the migration method was invoked.
|
||||
*
|
||||
* @var array<string, mixed>
|
||||
*/
|
||||
public $options;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param string $method
|
||||
* @param array<string, mixed> $options
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($method, array $options = [])
|
||||
{
|
||||
$this->method = $method;
|
||||
$this->options = $options;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
use Illuminate\Database\Connection;
|
||||
|
||||
class MigrationsPruned
|
||||
{
|
||||
/**
|
||||
* The database connection instance.
|
||||
*
|
||||
* @var \Illuminate\Database\Connection
|
||||
*/
|
||||
public $connection;
|
||||
|
||||
/**
|
||||
* The database connection name.
|
||||
*
|
||||
* @var string|null
|
||||
*/
|
||||
public $connectionName;
|
||||
|
||||
/**
|
||||
* The path to the directory where migrations were pruned.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $path;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param \Illuminate\Database\Connection $connection
|
||||
* @param string $path
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Connection $connection, string $path)
|
||||
{
|
||||
$this->connection = $connection;
|
||||
$this->connectionName = $connection->getName();
|
||||
$this->path = $path;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
class MigrationsStarted extends MigrationsEvent
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
class ModelPruningFinished
|
||||
{
|
||||
/**
|
||||
* The class names of the models that were pruned.
|
||||
*
|
||||
* @var array<class-string>
|
||||
*/
|
||||
public $models;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param array<class-string> $models
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($models)
|
||||
{
|
||||
$this->models = $models;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
class ModelPruningStarting
|
||||
{
|
||||
/**
|
||||
* The class names of the models that will be pruned.
|
||||
*
|
||||
* @var array<class-string>
|
||||
*/
|
||||
public $models;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param array<class-string> $models
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($models)
|
||||
{
|
||||
$this->models = $models;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
class ModelsPruned
|
||||
{
|
||||
/**
|
||||
* The class name of the model that was pruned.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $model;
|
||||
|
||||
/**
|
||||
* The number of pruned records.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $count;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param string $model
|
||||
* @param int $count
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($model, $count)
|
||||
{
|
||||
$this->model = $model;
|
||||
$this->count = $count;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?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();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the raw SQL representation of the query with embedded bindings.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toRawSql()
|
||||
{
|
||||
return $this->connection
|
||||
->query()
|
||||
->getGrammar()
|
||||
->substituteBindingsIntoRawSql($this->sql, $this->connection->prepareBindings($this->bindings));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
class SchemaLoaded
|
||||
{
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
class TransactionBeginning extends ConnectionEvent
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
class TransactionCommitted extends ConnectionEvent
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
class TransactionCommitting extends ConnectionEvent
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Database\Events;
|
||||
|
||||
class TransactionRolledBack extends ConnectionEvent
|
||||
{
|
||||
//
|
||||
}
|
||||
Reference in New Issue
Block a user