Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/.././././../vendor/phpoffice/../nesbot/../theseer/../laravel/./../unicodeveloper/../doctrine/dbal/./src/Cache/../Event
الملفات الموجودة في هذا الـ Path:
.
..
ConnectionEventArgs.php
Listeners
SchemaAlterTableAddColumnEventArgs.php
SchemaAlterTableChangeColumnEventArgs.php
SchemaAlterTableEventArgs.php
SchemaAlterTableRemoveColumnEventArgs.php
SchemaAlterTableRenameColumnEventArgs.php
SchemaColumnDefinitionEventArgs.php
SchemaCreateTableColumnEventArgs.php
SchemaCreateTableEventArgs.php
SchemaDropTableEventArgs.php
SchemaEventArgs.php
SchemaIndexDefinitionEventArgs.php
TransactionBeginEventArgs.php
TransactionCommitEventArgs.php
TransactionEventArgs.php
TransactionRollBackEventArgs.php

مشاهدة ملف: SchemaAlterTableEventArgs.php

<?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;
    }
}