Skip to content

Commit

Permalink
Add ability to dynamically add and delete columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Wim Molenberghs committed Nov 29, 2016
1 parent ed3ad9a commit ba51276
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Columns.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,19 @@ public function offsetGet($offset)
*/
public function offsetSet($offset, $value)
{
throw new \InvalidArgumentException('Not implemented');
if ($this->offsetExists($offset) === false) {
$this->columns[$offset] = $value;
}
}

/**
* {@inheritdoc}
*/
public function offsetUnset($offset)
{
throw new \InvalidArgumentException('Not implemented');
if ($this->offsetExists($offset) === false) {
unset($this->columns[$offset]);
}
}

/**
Expand Down

0 comments on commit ba51276

Please sign in to comment.