Skip to content

Instantly share code, notes, and snippets.

@ericsk
Created December 30, 2013 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericsk/8183060 to your computer and use it in GitHub Desktop.
Save ericsk/8183060 to your computer and use it in GitHub Desktop.
WindowsAzureSessionHandler 的 Open/Close 方法
/**
* 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