Public Member Functions | |
| XoopsToken ($name, $timeout=XOOPS_TOKEN_TIMEOUT) | |
| _generateToken () | |
| getTokenName () | |
| getTokenValue () | |
| setSerialNumber ($serial_number) | |
| getSerialNumber () | |
| getHtml () | |
| getUrl () | |
| validate ($token=null) | |
Public Attributes | |
| $_name_ | |
| $_token_ | |
| $_lifetime_ | |
| $_unlimited_ | |
| $_number_ = 0 | |
You can refer to a handler class for this token. this token class means ticket, and handler class means ticket agent. there is a strict ticket agent type(XoopsSingleTokenHandler), and flexible ticket agent for the tab browser(XoopsMultiTokenHandler).
| XoopsToken::XoopsToken | ( | $ | name, | |
| $ | timeout = XOOPS_TOKEN_TIMEOUT | |||
| ) |
| $name | this token's name string. | |
| $timeout | effective time(if $timeout equal 0, this token will become unlimited) |
| XoopsToken::_generateToken | ( | ) |
Returns random string for token's string.
protected
| XoopsToken::getTokenName | ( | ) |
Returns this token's name.
public
| XoopsToken::getTokenValue | ( | ) |
Returns this token's string.
public
| XoopsToken::setSerialNumber | ( | $ | serial_number | ) |
Set this token's serial number.
public
| $serial_number | serial number |
| XoopsToken::getSerialNumber | ( | ) |
Returns this token's serial number.
public
| XoopsToken::getHtml | ( | ) |
Returns hidden tag string that includes this token. you can use it for <form> tag's member.
public
| XoopsToken::getUrl | ( | ) |
Returns url string that includes this token. you can use it for hyper link.
| XoopsToken::validate | ( | $ | token = null |
) |
If $token equals this token's string, true is returened.
| XoopsToken::$_name_ |
token's name. this is used for identification. protected
| XoopsToken::$_token_ |
token's string for inquiry. this should be a random code for security. private
| XoopsToken::$_lifetime_ |
the unixtime when this token is effective.
protected
| XoopsToken::$_unlimited_ |
unlimited flag. if this is true, this token is not limited in lifetime.
| XoopsToken::$_number_ = 0 |
serial number. this used for identification of tokens of same name tokens.
private
1.5.1