====== CSRFGuard ======
**Layer:** ''Core'' · **Source:** ''lib/core/CSRFGuard.php:18'' (lines 18–154)
----
class CSRFGuard
CSRFGuard
======= Docblock Metadata =======
^ Tag ^ Value ^
| ''@category'' | Core Class |
| ''@author'' | Thibaut Despoulain |
| ''@author'' | M.Noermoehammad |
| ''@license'' | MIT |
| ''@version'' | 1.0 |
======= Inheritance =======
//No parent, interface or trait. This is a root type.//
======= Constants (0) =======
//None.//
======= Properties (1) =======
^ Visibility ^ Type ^ Name ^ Default ^ Line ^
| ''private static'' | ''static'' | ''$checkOrigin'' | ''false'' | 20 |
======= Methods (4) =======
^ Visibility ^ Method ^ Summary ^ Line ^
| public static | ''check()'' | check | 29 |
| public static | ''generate()'' | generate | 118 |
| private static | ''enableOriginCheck()'' | enableOriginCheck | 135 |
| private static | ''randomString()'' | randomString | 150 |
======== check() ========
public static function check($key, $origin, $throwException = false, $timespan = null, $multiple = false)
//lines 29–109 (81)//
^ Parameter ^ Type ^ Default ^ Description ^
| ''$key'' | ''(untyped)'' | //required// | //none// |
| ''$origin'' | ''(untyped)'' | //required// | //none// |
| ''$throwException'' | ''(untyped)'' | ''false'' | //none// |
| ''$timespan'' | ''(untyped)'' | ''null'' | //none// |
| ''$multiple'' | ''(untyped)'' | ''false'' | //none// |
**Returns:** ''(none declared)'' — true|false|\Exception
======== generate() ========
public static function generate($key)
//lines 118–128 (11)//
^ Parameter ^ Type ^ Default ^ Description ^
| ''$key'' | ''(untyped)'' | //required// | //none// |
**Returns:** ''(none declared)'' — string
======== enableOriginCheck() ========
private static function enableOriginCheck()
//lines 135–141 (7)//
enableOriginCheck
//Takes no parameters.//
**Returns:** ''(none declared)'' — bool
======== randomString() ========
private static function randomString($length)
//lines 150–153 (4)//
randomString
^ Parameter ^ Type ^ Default ^ Description ^
| ''$length'' | ''(untyped)'' | //required// | //none// |
**Returns:** ''(none declared)'' — string
----
//This page is generated from source by 'tools/gendoc'. Edits will be overwritten.//