Skip to content

Commit

Permalink
README #4
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghostff committed Jun 30, 2017
1 parent ba74877 commit 94ceb8e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ Session::registerErrorHandler(function($error, $error_code)
});
```

## Setting session id *:void*
## Setting or getting session id *:void*
```php
#This method must be implemented before Session::start
#When setting ID, method must be implemented before Session::start
Session::id(bin2hex(random_bytes(32)));

#Get ID
echo Session::id();
```

## Initializing Session
Expand Down Expand Up @@ -87,7 +90,7 @@ $session->all($optional_segment);

## Check if variable exist in current session namespace *:bool*
```php
$session->exists($variable_name, $in_flash);
$session->exist($variable_name, $option_segment, $in_flash);
```


Expand All @@ -103,5 +106,5 @@ $session->destroy();

## Regenerate session ID *:void*
```php
$session->rotate(true);
$session->rotate($keep_old_session_data);
```

0 comments on commit 94ceb8e

Please sign in to comment.