Skip to content

Commit

Permalink
Added function Session::clear()
Browse files Browse the repository at this point in the history
  • Loading branch information
mahagr committed Jun 12, 2018
1 parent 0a3cadc commit 027a760
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions system/src/Grav/Framework/Session/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,16 @@ public function close()
return $this;
}

/**
* @inheritdoc
*/
public function clear()
{
session_unset();

return $this;
}

/**
* @inheritdoc
*/
Expand Down
7 changes: 7 additions & 0 deletions system/src/Grav/Framework/Session/SessionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ public function invalidate();
*/
public function close();

/**
* Free all session variables.
*
* @return $this
*/
public function clear();

/**
* Returns all session variables.
*
Expand Down

0 comments on commit 027a760

Please sign in to comment.