Commit dc86017d authored by jsor's avatar jsor

Preserve table object for event args

parent b0bccb92
...@@ -878,6 +878,8 @@ abstract class AbstractPlatform ...@@ -878,6 +878,8 @@ abstract class AbstractPlatform
*/ */
public function getDropTableSQL($table) public function getDropTableSQL($table)
{ {
$tableArg = $table;
if ($table instanceof \Doctrine\DBAL\Schema\Table) { if ($table instanceof \Doctrine\DBAL\Schema\Table) {
$table = $table->getQuotedName($this); $table = $table->getQuotedName($this);
} else if(!is_string($table)) { } else if(!is_string($table)) {
...@@ -885,7 +887,7 @@ abstract class AbstractPlatform ...@@ -885,7 +887,7 @@ abstract class AbstractPlatform
} }
if (null !== $this->_eventManager && $this->_eventManager->hasListeners(Events::onSchemaDropTable)) { if (null !== $this->_eventManager && $this->_eventManager->hasListeners(Events::onSchemaDropTable)) {
$eventArgs = new SchemaDropTableEventArgs($table, $this); $eventArgs = new SchemaDropTableEventArgs($tableArg, $this);
$this->_eventManager->dispatchEvent(Events::onSchemaDropTable, $eventArgs); $this->_eventManager->dispatchEvent(Events::onSchemaDropTable, $eventArgs);
if ($eventArgs->isDefaultPrevented()) { if ($eventArgs->isDefaultPrevented()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment