Skip to content

Commit

Permalink
Merge pull request #13 from qbhy/master
Browse files Browse the repository at this point in the history
添加 rebind 方法
  • Loading branch information
Hanson committed May 28, 2020
2 parents 1c11139 + 6df9a36 commit 1ade721
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Foundation.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,12 @@ public function __set($id, $value)
{
$this->offsetSet($id, $value);
}

public function rebind(string $id, $value)
{
$this->offsetUnset($id);
$this->offsetSet($id, $value);

return $this;
}
}

0 comments on commit 1ade721

Please sign in to comment.