BASE . LOG, 'file_id' => $LOG_FILE_ID, // add file date 'print_file_date' => true, // set debug and print flags 'debug_all' => $DEBUG_ALL ?? false, 'echo_all' => $ECHO_ALL ?? false, 'print_all' => $PRINT_ALL ?? false, ]); $basic = new CoreLibs\Basic($log); $_token = new CoreLibs\Output\Form\Token(); $token_class = 'CoreLibs\Output\Form\Token'; print "TEST CLASS: FORM TOKEN"; print ""; print '
Class Test Master
'; $token = 'test_form_token'; $token_id = $_token->setFormToken($token); print "TOKEN: $token: (ID) " . $token_id . " => (S) " . $_SESSION[$token] . "
"; print "VALIDATE: $token: " . (string)$_token->validateFormToken($token_id, $token) . "
"; $token = 'test_form_token_static'; $token_id = $token_class::setFormToken($token); print "S-TOKEN: $token: (ID) " . $token_id . " => (S) " . $_SESSION[$token] . "
"; print "S-VALIDATE: $token: " . (string)$token_class::validateFormToken($token_id, $token) . "
"; // DEPRECATED /* $token = 'test_form_token_deprecated'; $token_id = $basic->setFormToken($token); print "TOKEN: $token: (ID) ".$token_id." => (S) ".$_SESSION[$token]."
"; print "VALIDATE: $token: ".(string)$basic->validateFormToken($token_id, $token)."
"; */ // error message print $log->printErrorMsg(); print ""; // __END__