메소드 | 설명 | |
---|---|---|
__call ( string $name, array $params ) : string | Scalr_Session | This method is used to provide getters and setters for the session vars | |
create ( integer $userId, integer $ruid = null ) | Creates a session | |
destroy ( ) | Destroy session (including cookies). If session was created by admin, who logged into user (cookie auth is not equal to session auth), then destroy only session and re-create from cookie | |
getInstance ( boolean $isAutomaticRequest = false ) : Scalr_Session | ||
getRealUserId ( ) : integer | Gets real user identifier which is used to sign in to Scalr | |
getUserId ( ) : integer | Gets effective user identifier | |
isAuthenticated ( ) | ||
isCookieKeepSession ( ) : boolean | Check if cookies is valid and isn't expired | |
isVirtual ( ) : boolean | Checks whether the session is created by Scalr Admin | |
keepSession ( ) | Set special cookies. We could re-create session based on that cookies. | |
sessionLog ( $log ) |
메소드 | 설명 | |
---|---|---|
createCookieHash ( integer $userId, integer $expire, string $sault, string $hash ) : string | ||
createHash ( $userId, $sault ) : string | ||
getAccountHash ( integer $userId ) : string | Return account's hash. It's used for reseting keepSession on a whole account | |
getUserHash ( integer $userId ) : string | Return user's hash (id:email:password) | |
restore ( boolean $checkKeepSessionCookie = true, boolean $isAutomaticRequest = false ) | Check if session is valid and is not expired. If no valid session, check cookie keepSession. |
메소드 | 설명 | |
---|---|---|
getReflectionClass ( ) : ReflectionClass | Gets a reflection class | |
startSession ( ) | Starts session suppressing warnings and notices |
protected static createHash ( $userId, $sault ) : string | ||
$userId | ||
$sault | ||
리턴 | string |
public static destroy ( ) |
protected static getAccountHash ( integer $userId ) : string | ||
$userId | integer | |
리턴 | string |
public static getInstance ( boolean $isAutomaticRequest = false ) : Scalr_Session | ||
$isAutomaticRequest | boolean | |
리턴 | Scalr_Session |
public getRealUserId ( ) : integer | ||
리턴 | integer | Returns real user identifier which is used to sign in to Scalr |
protected static getUserHash ( integer $userId ) : string | ||
$userId | integer | |
리턴 | string |
public static isCookieKeepSession ( ) : boolean | ||
리턴 | boolean |
public static keepSession ( ) |