Skip to content

Commit

Permalink
add clear method
Browse files Browse the repository at this point in the history
  • Loading branch information
JanHuang committed Jan 18, 2018
1 parent b72749e commit e14a111
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/AbstractSessionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,12 @@ public function has($key)
{
return $this->driver->has($key);
}

/**
* @return bool
*/
public function clear()
{
return $this->driver->clear();
}
}
8 changes: 8 additions & 0 deletions src/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,12 @@ public function delete($key)

return $this;
}

/**
* @return bool
*/
public function clear()
{
return $this->sessionHandler->clear();
}
}
5 changes: 5 additions & 0 deletions src/SessionHandlerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,9 @@ public function delete($key);
* @return bool
*/
public function has($key);

/**
* @return mixed
*/
public function clear();
}

0 comments on commit e14a111

Please sign in to comment.