/** * Lays down a CSRF state token for this process. * * @return void */ protected static function establishCSRFTokenState() { if (self::$state === null) { self::$state = md5(uniqid(mt_rand(), true)); self::setPersistentData('state', self::$state); } }