Merge branch 'master' into develop
This commit is contained in:
commit
879e56df75
|
@ -120,9 +120,16 @@ protected static function implications($table)
|
||||||
{
|
{
|
||||||
foreach (array('primary', 'unique', 'fulltext', 'index') as $key)
|
foreach (array('primary', 'unique', 'fulltext', 'index') as $key)
|
||||||
{
|
{
|
||||||
if (isset($column->attributes[$key]))
|
if (isset($column->$key))
|
||||||
{
|
{
|
||||||
$table->$key($column->name);
|
if ($column->$key === true)
|
||||||
|
{
|
||||||
|
$table->$key($column->name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$table->$key($column->name, $column->$key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,4 +77,20 @@ public function __set($key, $value)
|
||||||
$this->attributes[$key] = $value;
|
$this->attributes[$key] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dynamically check if an attribute is set.
|
||||||
|
*/
|
||||||
|
public function __isset($key)
|
||||||
|
{
|
||||||
|
return isset($this->attributes[$key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dynamically unset an attribute.
|
||||||
|
*/
|
||||||
|
public function __unset($key)
|
||||||
|
{
|
||||||
|
return unset($this->attributes[$key]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue