Created
December 30, 2013 15:00
-
-
Save ericsk/8183060 to your computer and use it in GitHub Desktop.
WindowsAzureSessionHandler 的 Open/Close 方法
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Callback function for session handler. It's invoked while the session is being opened. | |
* | |
* @param $savePath The path to store the session. | |
* @param $sessionName The name of the session. | |
* | |
* @return boolean If the open operation success. | |
*/ | |
public function open($savePath, $sessionName) { | |
try { | |
// get table to see if the table exists. | |
$this->_tableRestProxy->getTable($this->_sessionContainer); | |
} catch (ServiceException $e) { | |
// cannot get the table, so create it | |
$this->_tableRestProxy->createTable($this->_sessionContainer); | |
} | |
return TRUE; | |
} | |
/** | |
* Callback function for session handler. It's invoked while the session is being closed. | |
* | |
* @return boolean If the close operation success. | |
*/ | |
public function close() { | |
// do nothing | |
return TRUE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment