Update website
This commit is contained in:
parent
4413528994
commit
1d90fbf296
6865 changed files with 1091082 additions and 0 deletions
27
vendor/doctrine/dbal/src/Event/ConnectionEventArgs.php
vendored
Normal file
27
vendor/doctrine/dbal/src/Event/ConnectionEventArgs.php
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\Common\EventArgs;
|
||||
use Doctrine\DBAL\Connection;
|
||||
|
||||
/**
|
||||
* Event Arguments used when a Driver connection is established inside Doctrine\DBAL\Connection.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class ConnectionEventArgs extends EventArgs
|
||||
{
|
||||
private Connection $connection;
|
||||
|
||||
public function __construct(Connection $connection)
|
||||
{
|
||||
$this->connection = $connection;
|
||||
}
|
||||
|
||||
/** @return Connection */
|
||||
public function getConnection()
|
||||
{
|
||||
return $this->connection;
|
||||
}
|
||||
}
|
77
vendor/doctrine/dbal/src/Event/Listeners/OracleSessionInit.php
vendored
Normal file
77
vendor/doctrine/dbal/src/Event/Listeners/OracleSessionInit.php
vendored
Normal file
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event\Listeners;
|
||||
|
||||
use Doctrine\Common\EventSubscriber;
|
||||
use Doctrine\DBAL\Event\ConnectionEventArgs;
|
||||
use Doctrine\DBAL\Events;
|
||||
use Doctrine\DBAL\Exception;
|
||||
|
||||
use function array_change_key_case;
|
||||
use function array_merge;
|
||||
use function count;
|
||||
use function implode;
|
||||
|
||||
use const CASE_UPPER;
|
||||
|
||||
/**
|
||||
* Should be used when Oracle Server default environment does not match the Doctrine requirements.
|
||||
*
|
||||
* The following environment variables are required for the Doctrine default date format:
|
||||
*
|
||||
* NLS_TIME_FORMAT="HH24:MI:SS"
|
||||
* NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
|
||||
* NLS_TIMESTAMP_FORMAT="YYYY-MM-DD HH24:MI:SS"
|
||||
* NLS_TIMESTAMP_TZ_FORMAT="YYYY-MM-DD HH24:MI:SS TZH:TZM"
|
||||
*
|
||||
* @deprecated Use {@see \Doctrine\DBAL\Driver\OCI8\Middleware\InitializeSession} instead.
|
||||
*/
|
||||
class OracleSessionInit implements EventSubscriber
|
||||
{
|
||||
/** @var string[] */
|
||||
protected $_defaultSessionVars = [
|
||||
'NLS_TIME_FORMAT' => 'HH24:MI:SS',
|
||||
'NLS_DATE_FORMAT' => 'YYYY-MM-DD HH24:MI:SS',
|
||||
'NLS_TIMESTAMP_FORMAT' => 'YYYY-MM-DD HH24:MI:SS',
|
||||
'NLS_TIMESTAMP_TZ_FORMAT' => 'YYYY-MM-DD HH24:MI:SS TZH:TZM',
|
||||
'NLS_NUMERIC_CHARACTERS' => '.,',
|
||||
];
|
||||
|
||||
/** @param string[] $oracleSessionVars */
|
||||
public function __construct(array $oracleSessionVars = [])
|
||||
{
|
||||
$this->_defaultSessionVars = array_merge($this->_defaultSessionVars, $oracleSessionVars);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function postConnect(ConnectionEventArgs $args)
|
||||
{
|
||||
if (count($this->_defaultSessionVars) === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$vars = [];
|
||||
foreach (array_change_key_case($this->_defaultSessionVars, CASE_UPPER) as $option => $value) {
|
||||
if ($option === 'CURRENT_SCHEMA') {
|
||||
$vars[] = $option . ' = ' . $value;
|
||||
} else {
|
||||
$vars[] = $option . " = '" . $value . "'";
|
||||
}
|
||||
}
|
||||
|
||||
$sql = 'ALTER SESSION SET ' . implode(' ', $vars);
|
||||
$args->getConnection()->executeStatement($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getSubscribedEvents()
|
||||
{
|
||||
return [Events::postConnect];
|
||||
}
|
||||
}
|
43
vendor/doctrine/dbal/src/Event/Listeners/SQLSessionInit.php
vendored
Normal file
43
vendor/doctrine/dbal/src/Event/Listeners/SQLSessionInit.php
vendored
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event\Listeners;
|
||||
|
||||
use Doctrine\Common\EventSubscriber;
|
||||
use Doctrine\DBAL\Event\ConnectionEventArgs;
|
||||
use Doctrine\DBAL\Events;
|
||||
use Doctrine\DBAL\Exception;
|
||||
|
||||
/**
|
||||
* Session init listener for executing a single SQL statement right after a connection is opened.
|
||||
*
|
||||
* @deprecated Implement a middleware instead.
|
||||
*/
|
||||
class SQLSessionInit implements EventSubscriber
|
||||
{
|
||||
/** @var string */
|
||||
protected $sql;
|
||||
|
||||
/** @param string $sql */
|
||||
public function __construct($sql)
|
||||
{
|
||||
$this->sql = $sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function postConnect(ConnectionEventArgs $args)
|
||||
{
|
||||
$args->getConnection()->executeStatement($this->sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getSubscribedEvents()
|
||||
{
|
||||
return [Events::postConnect];
|
||||
}
|
||||
}
|
30
vendor/doctrine/dbal/src/Event/Listeners/SQLiteSessionInit.php
vendored
Normal file
30
vendor/doctrine/dbal/src/Event/Listeners/SQLiteSessionInit.php
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event\Listeners;
|
||||
|
||||
use Doctrine\Common\EventSubscriber;
|
||||
use Doctrine\DBAL\Event\ConnectionEventArgs;
|
||||
use Doctrine\DBAL\Events;
|
||||
use Doctrine\DBAL\Exception;
|
||||
|
||||
/** @deprecated Use {@see \Doctrine\DBAL\Driver\AbstractSQLiteDriver\Middleware\EnableForeignKeys} instead. */
|
||||
class SQLiteSessionInit implements EventSubscriber
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function postConnect(ConnectionEventArgs $args)
|
||||
{
|
||||
$args->getConnection()->executeStatement('PRAGMA foreign_keys=ON');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getSubscribedEvents()
|
||||
{
|
||||
return [Events::postConnect];
|
||||
}
|
||||
}
|
81
vendor/doctrine/dbal/src/Event/SchemaAlterTableAddColumnEventArgs.php
vendored
Normal file
81
vendor/doctrine/dbal/src/Event/SchemaAlterTableAddColumnEventArgs.php
vendored
Normal file
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
use Doctrine\DBAL\Schema\Column;
|
||||
use Doctrine\DBAL\Schema\TableDiff;
|
||||
use Doctrine\Deprecations\Deprecation;
|
||||
|
||||
use function array_merge;
|
||||
use function func_get_args;
|
||||
use function is_array;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for adding table columns are generated inside {@see AbstractPlatform}.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs
|
||||
{
|
||||
private Column $column;
|
||||
private TableDiff $tableDiff;
|
||||
private AbstractPlatform $platform;
|
||||
|
||||
/** @var string[] */
|
||||
private array $sql = [];
|
||||
|
||||
public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform)
|
||||
{
|
||||
$this->column = $column;
|
||||
$this->tableDiff = $tableDiff;
|
||||
$this->platform = $platform;
|
||||
}
|
||||
|
||||
/** @return Column */
|
||||
public function getColumn()
|
||||
{
|
||||
return $this->column;
|
||||
}
|
||||
|
||||
/** @return TableDiff */
|
||||
public function getTableDiff()
|
||||
{
|
||||
return $this->tableDiff;
|
||||
}
|
||||
|
||||
/** @return AbstractPlatform */
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
|
||||
*
|
||||
* @param string|string[] $sql
|
||||
*
|
||||
* @return SchemaAlterTableAddColumnEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
if (is_array($sql)) {
|
||||
Deprecation::trigger(
|
||||
'doctrine/dbal',
|
||||
'https://github.com/doctrine/dbal/issues/3580',
|
||||
'Passing multiple SQL statements as an array to SchemaAlterTableAddColumnEventaArrgs::addSql() ' .
|
||||
'is deprecated. Pass each statement as an individual argument instead.',
|
||||
);
|
||||
}
|
||||
|
||||
$this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/** @return string[] */
|
||||
public function getSql()
|
||||
{
|
||||
return $this->sql;
|
||||
}
|
||||
}
|
71
vendor/doctrine/dbal/src/Event/SchemaAlterTableChangeColumnEventArgs.php
vendored
Normal file
71
vendor/doctrine/dbal/src/Event/SchemaAlterTableChangeColumnEventArgs.php
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
use Doctrine\DBAL\Schema\ColumnDiff;
|
||||
use Doctrine\DBAL\Schema\TableDiff;
|
||||
|
||||
use function array_merge;
|
||||
use function func_get_args;
|
||||
use function is_array;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for changing table columns are generated inside {@see AbstractPlatform}.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs
|
||||
{
|
||||
private ColumnDiff $columnDiff;
|
||||
private TableDiff $tableDiff;
|
||||
private AbstractPlatform $platform;
|
||||
|
||||
/** @var string[] */
|
||||
private array $sql = [];
|
||||
|
||||
public function __construct(ColumnDiff $columnDiff, TableDiff $tableDiff, AbstractPlatform $platform)
|
||||
{
|
||||
$this->columnDiff = $columnDiff;
|
||||
$this->tableDiff = $tableDiff;
|
||||
$this->platform = $platform;
|
||||
}
|
||||
|
||||
/** @return ColumnDiff */
|
||||
public function getColumnDiff()
|
||||
{
|
||||
return $this->columnDiff;
|
||||
}
|
||||
|
||||
/** @return TableDiff */
|
||||
public function getTableDiff()
|
||||
{
|
||||
return $this->tableDiff;
|
||||
}
|
||||
|
||||
/** @return AbstractPlatform */
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
|
||||
*
|
||||
* @param string|string[] $sql
|
||||
*
|
||||
* @return SchemaAlterTableChangeColumnEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
$this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/** @return string[] */
|
||||
public function getSql()
|
||||
{
|
||||
return $this->sql;
|
||||
}
|
||||
}
|
62
vendor/doctrine/dbal/src/Event/SchemaAlterTableEventArgs.php
vendored
Normal file
62
vendor/doctrine/dbal/src/Event/SchemaAlterTableEventArgs.php
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
use Doctrine\DBAL\Schema\TableDiff;
|
||||
|
||||
use function array_merge;
|
||||
use function func_get_args;
|
||||
use function is_array;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for creating tables are generated inside {@see AbstractPlatform}.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class SchemaAlterTableEventArgs extends SchemaEventArgs
|
||||
{
|
||||
private TableDiff $tableDiff;
|
||||
private AbstractPlatform $platform;
|
||||
|
||||
/** @var string[] */
|
||||
private array $sql = [];
|
||||
|
||||
public function __construct(TableDiff $tableDiff, AbstractPlatform $platform)
|
||||
{
|
||||
$this->tableDiff = $tableDiff;
|
||||
$this->platform = $platform;
|
||||
}
|
||||
|
||||
/** @return TableDiff */
|
||||
public function getTableDiff()
|
||||
{
|
||||
return $this->tableDiff;
|
||||
}
|
||||
|
||||
/** @return AbstractPlatform */
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
|
||||
*
|
||||
* @param string|string[] $sql
|
||||
*
|
||||
* @return SchemaAlterTableEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
$this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/** @return string[] */
|
||||
public function getSql()
|
||||
{
|
||||
return $this->sql;
|
||||
}
|
||||
}
|
71
vendor/doctrine/dbal/src/Event/SchemaAlterTableRemoveColumnEventArgs.php
vendored
Normal file
71
vendor/doctrine/dbal/src/Event/SchemaAlterTableRemoveColumnEventArgs.php
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
use Doctrine\DBAL\Schema\Column;
|
||||
use Doctrine\DBAL\Schema\TableDiff;
|
||||
|
||||
use function array_merge;
|
||||
use function func_get_args;
|
||||
use function is_array;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for removing table columns are generated inside {@see AbstractPlatform}.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs
|
||||
{
|
||||
private Column $column;
|
||||
private TableDiff $tableDiff;
|
||||
private AbstractPlatform $platform;
|
||||
|
||||
/** @var string[] */
|
||||
private array $sql = [];
|
||||
|
||||
public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform)
|
||||
{
|
||||
$this->column = $column;
|
||||
$this->tableDiff = $tableDiff;
|
||||
$this->platform = $platform;
|
||||
}
|
||||
|
||||
/** @return Column */
|
||||
public function getColumn()
|
||||
{
|
||||
return $this->column;
|
||||
}
|
||||
|
||||
/** @return TableDiff */
|
||||
public function getTableDiff()
|
||||
{
|
||||
return $this->tableDiff;
|
||||
}
|
||||
|
||||
/** @return AbstractPlatform */
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
|
||||
*
|
||||
* @param string|string[] $sql
|
||||
*
|
||||
* @return SchemaAlterTableRemoveColumnEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
$this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/** @return string[] */
|
||||
public function getSql()
|
||||
{
|
||||
return $this->sql;
|
||||
}
|
||||
}
|
82
vendor/doctrine/dbal/src/Event/SchemaAlterTableRenameColumnEventArgs.php
vendored
Normal file
82
vendor/doctrine/dbal/src/Event/SchemaAlterTableRenameColumnEventArgs.php
vendored
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
use Doctrine\DBAL\Schema\Column;
|
||||
use Doctrine\DBAL\Schema\TableDiff;
|
||||
|
||||
use function array_merge;
|
||||
use function func_get_args;
|
||||
use function is_array;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for renaming table columns are generated inside {@see AbstractPlatform}.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
|
||||
{
|
||||
/** @var string */
|
||||
private $oldColumnName;
|
||||
|
||||
private Column $column;
|
||||
private TableDiff $tableDiff;
|
||||
private AbstractPlatform $platform;
|
||||
|
||||
/** @var string[] */
|
||||
private array $sql = [];
|
||||
|
||||
/** @param string $oldColumnName */
|
||||
public function __construct($oldColumnName, Column $column, TableDiff $tableDiff, AbstractPlatform $platform)
|
||||
{
|
||||
$this->oldColumnName = $oldColumnName;
|
||||
$this->column = $column;
|
||||
$this->tableDiff = $tableDiff;
|
||||
$this->platform = $platform;
|
||||
}
|
||||
|
||||
/** @return string */
|
||||
public function getOldColumnName()
|
||||
{
|
||||
return $this->oldColumnName;
|
||||
}
|
||||
|
||||
/** @return Column */
|
||||
public function getColumn()
|
||||
{
|
||||
return $this->column;
|
||||
}
|
||||
|
||||
/** @return TableDiff */
|
||||
public function getTableDiff()
|
||||
{
|
||||
return $this->tableDiff;
|
||||
}
|
||||
|
||||
/** @return AbstractPlatform */
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
|
||||
*
|
||||
* @param string|string[] $sql
|
||||
*
|
||||
* @return SchemaAlterTableRenameColumnEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
$this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/** @return string[] */
|
||||
public function getSql()
|
||||
{
|
||||
return $this->sql;
|
||||
}
|
||||
}
|
87
vendor/doctrine/dbal/src/Event/SchemaColumnDefinitionEventArgs.php
vendored
Normal file
87
vendor/doctrine/dbal/src/Event/SchemaColumnDefinitionEventArgs.php
vendored
Normal file
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Connection;
|
||||
use Doctrine\DBAL\Schema\Column;
|
||||
|
||||
/**
|
||||
* Event Arguments used when the portable column definition is generated inside {@see AbstractPlatform}.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
|
||||
{
|
||||
private ?Column $column = null;
|
||||
|
||||
/**
|
||||
* Raw column data as fetched from the database.
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
private $tableColumn;
|
||||
|
||||
/** @var string */
|
||||
private $table;
|
||||
|
||||
/** @var string */
|
||||
private $database;
|
||||
|
||||
private Connection $connection;
|
||||
|
||||
/**
|
||||
* @param mixed[] $tableColumn
|
||||
* @param string $table
|
||||
* @param string $database
|
||||
*/
|
||||
public function __construct(array $tableColumn, $table, $database, Connection $connection)
|
||||
{
|
||||
$this->tableColumn = $tableColumn;
|
||||
$this->table = $table;
|
||||
$this->database = $database;
|
||||
$this->connection = $connection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows to clear the column which means the column will be excluded from
|
||||
* tables column list.
|
||||
*
|
||||
* @return SchemaColumnDefinitionEventArgs
|
||||
*/
|
||||
public function setColumn(?Column $column = null)
|
||||
{
|
||||
$this->column = $column;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/** @return Column|null */
|
||||
public function getColumn()
|
||||
{
|
||||
return $this->column;
|
||||
}
|
||||
|
||||
/** @return mixed[] */
|
||||
public function getTableColumn()
|
||||
{
|
||||
return $this->tableColumn;
|
||||
}
|
||||
|
||||
/** @return string */
|
||||
public function getTable()
|
||||
{
|
||||
return $this->table;
|
||||
}
|
||||
|
||||
/** @return string */
|
||||
public function getDatabase()
|
||||
{
|
||||
return $this->database;
|
||||
}
|
||||
|
||||
/** @return Connection */
|
||||
public function getConnection()
|
||||
{
|
||||
return $this->connection;
|
||||
}
|
||||
}
|
71
vendor/doctrine/dbal/src/Event/SchemaCreateTableColumnEventArgs.php
vendored
Normal file
71
vendor/doctrine/dbal/src/Event/SchemaCreateTableColumnEventArgs.php
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
use Doctrine\DBAL\Schema\Column;
|
||||
use Doctrine\DBAL\Schema\Table;
|
||||
|
||||
use function array_merge;
|
||||
use function func_get_args;
|
||||
use function is_array;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for creating table columns are generated inside {@see AbstractPlatform}.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class SchemaCreateTableColumnEventArgs extends SchemaEventArgs
|
||||
{
|
||||
private Column $column;
|
||||
private Table $table;
|
||||
private AbstractPlatform $platform;
|
||||
|
||||
/** @var string[] */
|
||||
private array $sql = [];
|
||||
|
||||
public function __construct(Column $column, Table $table, AbstractPlatform $platform)
|
||||
{
|
||||
$this->column = $column;
|
||||
$this->table = $table;
|
||||
$this->platform = $platform;
|
||||
}
|
||||
|
||||
/** @return Column */
|
||||
public function getColumn()
|
||||
{
|
||||
return $this->column;
|
||||
}
|
||||
|
||||
/** @return Table */
|
||||
public function getTable()
|
||||
{
|
||||
return $this->table;
|
||||
}
|
||||
|
||||
/** @return AbstractPlatform */
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
|
||||
*
|
||||
* @param string|string[] $sql
|
||||
*
|
||||
* @return SchemaCreateTableColumnEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
$this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/** @return string[] */
|
||||
public function getSql()
|
||||
{
|
||||
return $this->sql;
|
||||
}
|
||||
}
|
87
vendor/doctrine/dbal/src/Event/SchemaCreateTableEventArgs.php
vendored
Normal file
87
vendor/doctrine/dbal/src/Event/SchemaCreateTableEventArgs.php
vendored
Normal file
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
use Doctrine\DBAL\Schema\Table;
|
||||
|
||||
use function array_merge;
|
||||
use function func_get_args;
|
||||
use function is_array;
|
||||
|
||||
/**
|
||||
* Event Arguments used when SQL queries for creating tables are generated inside {@see AbstractPlatform}.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class SchemaCreateTableEventArgs extends SchemaEventArgs
|
||||
{
|
||||
private Table $table;
|
||||
|
||||
/** @var mixed[][] */
|
||||
private array $columns;
|
||||
|
||||
/** @var mixed[] */
|
||||
private array $options;
|
||||
|
||||
private AbstractPlatform $platform;
|
||||
|
||||
/** @var string[] */
|
||||
private array $sql = [];
|
||||
|
||||
/**
|
||||
* @param mixed[][] $columns
|
||||
* @param mixed[] $options
|
||||
*/
|
||||
public function __construct(Table $table, array $columns, array $options, AbstractPlatform $platform)
|
||||
{
|
||||
$this->table = $table;
|
||||
$this->columns = $columns;
|
||||
$this->options = $options;
|
||||
$this->platform = $platform;
|
||||
}
|
||||
|
||||
/** @return Table */
|
||||
public function getTable()
|
||||
{
|
||||
return $this->table;
|
||||
}
|
||||
|
||||
/** @return mixed[][] */
|
||||
public function getColumns()
|
||||
{
|
||||
return $this->columns;
|
||||
}
|
||||
|
||||
/** @return mixed[] */
|
||||
public function getOptions()
|
||||
{
|
||||
return $this->options;
|
||||
}
|
||||
|
||||
/** @return AbstractPlatform */
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.
|
||||
*
|
||||
* @param string|string[] $sql
|
||||
*
|
||||
* @return SchemaCreateTableEventArgs
|
||||
*/
|
||||
public function addSql($sql)
|
||||
{
|
||||
$this->sql = array_merge($this->sql, is_array($sql) ? $sql : func_get_args());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/** @return string[] */
|
||||
public function getSql()
|
||||
{
|
||||
return $this->sql;
|
||||
}
|
||||
}
|
64
vendor/doctrine/dbal/src/Event/SchemaDropTableEventArgs.php
vendored
Normal file
64
vendor/doctrine/dbal/src/Event/SchemaDropTableEventArgs.php
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
use Doctrine\DBAL\Schema\Table;
|
||||
use InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* Event Arguments used when the SQL query for dropping tables are generated inside {@see AbstractPlatform}.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class SchemaDropTableEventArgs extends SchemaEventArgs
|
||||
{
|
||||
/** @var string|Table */
|
||||
private $table;
|
||||
|
||||
private AbstractPlatform $platform;
|
||||
|
||||
/** @var string|null */
|
||||
private $sql;
|
||||
|
||||
/**
|
||||
* @param string|Table $table
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function __construct($table, AbstractPlatform $platform)
|
||||
{
|
||||
$this->table = $table;
|
||||
$this->platform = $platform;
|
||||
}
|
||||
|
||||
/** @return string|Table */
|
||||
public function getTable()
|
||||
{
|
||||
return $this->table;
|
||||
}
|
||||
|
||||
/** @return AbstractPlatform */
|
||||
public function getPlatform()
|
||||
{
|
||||
return $this->platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sql
|
||||
*
|
||||
* @return SchemaDropTableEventArgs
|
||||
*/
|
||||
public function setSql($sql)
|
||||
{
|
||||
$this->sql = $sql;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/** @return string|null */
|
||||
public function getSql()
|
||||
{
|
||||
return $this->sql;
|
||||
}
|
||||
}
|
29
vendor/doctrine/dbal/src/Event/SchemaEventArgs.php
vendored
Normal file
29
vendor/doctrine/dbal/src/Event/SchemaEventArgs.php
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\Common\EventArgs;
|
||||
|
||||
/**
|
||||
* Base class for schema related events.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class SchemaEventArgs extends EventArgs
|
||||
{
|
||||
private bool $preventDefault = false;
|
||||
|
||||
/** @return SchemaEventArgs */
|
||||
public function preventDefault()
|
||||
{
|
||||
$this->preventDefault = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/** @return bool */
|
||||
public function isDefaultPrevented()
|
||||
{
|
||||
return $this->preventDefault;
|
||||
}
|
||||
}
|
75
vendor/doctrine/dbal/src/Event/SchemaIndexDefinitionEventArgs.php
vendored
Normal file
75
vendor/doctrine/dbal/src/Event/SchemaIndexDefinitionEventArgs.php
vendored
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\DBAL\Connection;
|
||||
use Doctrine\DBAL\Schema\Index;
|
||||
|
||||
/**
|
||||
* Event Arguments used when the portable index definition is generated inside {@see AbstractSchemaManager}.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
|
||||
{
|
||||
private ?Index $index = null;
|
||||
|
||||
/**
|
||||
* Raw index data as fetched from the database.
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
private array $tableIndex;
|
||||
|
||||
/** @var string */
|
||||
private $table;
|
||||
|
||||
private Connection $connection;
|
||||
|
||||
/**
|
||||
* @param mixed[] $tableIndex
|
||||
* @param string $table
|
||||
*/
|
||||
public function __construct(array $tableIndex, $table, Connection $connection)
|
||||
{
|
||||
$this->tableIndex = $tableIndex;
|
||||
$this->table = $table;
|
||||
$this->connection = $connection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows to clear the index which means the index will be excluded from tables index list.
|
||||
*
|
||||
* @return SchemaIndexDefinitionEventArgs
|
||||
*/
|
||||
public function setIndex(?Index $index = null)
|
||||
{
|
||||
$this->index = $index;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/** @return Index|null */
|
||||
public function getIndex()
|
||||
{
|
||||
return $this->index;
|
||||
}
|
||||
|
||||
/** @return mixed[] */
|
||||
public function getTableIndex()
|
||||
{
|
||||
return $this->tableIndex;
|
||||
}
|
||||
|
||||
/** @return string */
|
||||
public function getTable()
|
||||
{
|
||||
return $this->table;
|
||||
}
|
||||
|
||||
/** @return Connection */
|
||||
public function getConnection()
|
||||
{
|
||||
return $this->connection;
|
||||
}
|
||||
}
|
10
vendor/doctrine/dbal/src/Event/TransactionBeginEventArgs.php
vendored
Normal file
10
vendor/doctrine/dbal/src/Event/TransactionBeginEventArgs.php
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
/** @deprecated */
|
||||
class TransactionBeginEventArgs extends TransactionEventArgs
|
||||
{
|
||||
}
|
10
vendor/doctrine/dbal/src/Event/TransactionCommitEventArgs.php
vendored
Normal file
10
vendor/doctrine/dbal/src/Event/TransactionCommitEventArgs.php
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
/** @deprecated */
|
||||
class TransactionCommitEventArgs extends TransactionEventArgs
|
||||
{
|
||||
}
|
24
vendor/doctrine/dbal/src/Event/TransactionEventArgs.php
vendored
Normal file
24
vendor/doctrine/dbal/src/Event/TransactionEventArgs.php
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
use Doctrine\Common\EventArgs;
|
||||
use Doctrine\DBAL\Connection;
|
||||
|
||||
/** @deprecated */
|
||||
abstract class TransactionEventArgs extends EventArgs
|
||||
{
|
||||
private Connection $connection;
|
||||
|
||||
public function __construct(Connection $connection)
|
||||
{
|
||||
$this->connection = $connection;
|
||||
}
|
||||
|
||||
public function getConnection(): Connection
|
||||
{
|
||||
return $this->connection;
|
||||
}
|
||||
}
|
10
vendor/doctrine/dbal/src/Event/TransactionRollBackEventArgs.php
vendored
Normal file
10
vendor/doctrine/dbal/src/Event/TransactionRollBackEventArgs.php
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\DBAL\Event;
|
||||
|
||||
/** @deprecated */
|
||||
class TransactionRollBackEventArgs extends TransactionEventArgs
|
||||
{
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue