Commit 0679d3b6 authored by jsor's avatar jsor

Move sql related methods

parent 265faf48
......@@ -45,6 +45,11 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
* @var AbstractPlatform
*/
private $_platform = null;
/**
* @var array
*/
private $_sql = array();
public function __construct(Table $table, AbstractPlatform $platform)
{
......@@ -67,4 +72,27 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
{
return $this->_platform;
}
/**
* @param string|array $sql
* @return SchemaEventArgs
*/
public function addSql($sql)
{
if (is_array($sql)) {
$this->_sql = array_merge($this->_sql, $sql);
} else {
$this->_sql[] = $sql;
}
return $this;
}
/**
* @return array
*/
public function getSql()
{
return $this->_sql;
}
}
......@@ -39,11 +39,6 @@ class SchemaEventArgs extends EventArgs
*/
private $_preventDefault = false;
/**
* @var array
*/
private $_sql = array();
public function __construct(Table $table)
{
$this->_table = $table;
......@@ -66,27 +61,4 @@ class SchemaEventArgs extends EventArgs
{
return $this->_preventDefault;
}
/**
* @param string|array $sql
* @return SchemaEventArgs
*/
public function addSql($sql)
{
if (is_array($sql)) {
$this->_sql = array_merge($this->_sql, $sql);
} else {
$this->_sql[] = $sql;
}
return $this;
}
/**
* @return array
*/
public function getSql()
{
return $this->_sql;
}
}
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