| 1 | <?php |
||
| 17 | class LogoutHandler extends RequestHandler |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var array |
||
| 21 | */ |
||
| 22 | private static $url_handlers = [ |
||
| 23 | '' => 'logout' |
||
| 24 | ]; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var array |
||
| 28 | */ |
||
| 29 | private static $allowed_actions = [ |
||
| 30 | 'logout' |
||
| 31 | ]; |
||
| 32 | |||
| 33 | |||
| 34 | /** |
||
| 35 | * Log out form handler method |
||
| 36 | * |
||
| 37 | * This method is called when the user clicks on "logout" on the form |
||
| 38 | * created when the parameter <i>$checkCurrentUser</i> of the |
||
| 39 | * {@link __construct constructor} was set to TRUE and the user was |
||
| 40 | * currently logged in. |
||
| 41 | * |
||
| 42 | * @return bool|Member |
||
| 43 | */ |
||
| 44 | public function logout() |
||
| 50 | |||
| 51 | /** |
||
| 52 | * |
||
| 53 | * @param Member $member |
||
| 54 | * @return bool|Member Return a member if something goes wrong |
||
| 55 | */ |
||
| 56 | public function doLogOut($member) |
||
| 64 | } |
||
| 65 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: