Skip to content

Instantly share code, notes, and snippets.

@sbisbee
Created April 6, 2011 20:51
Show Gist options
  • Save sbisbee/906497 to your computer and use it in GitHub Desktop.
Save sbisbee/906497 to your computer and use it in GitHub Desktop.
An example for a blog article.
<?php
require_once 'CouchSessionStore.php';
class SuperCouchSessionStore extends CouchSessionStore
{
public static function setSag($sag)
{
//use CouchSessionStore to set everything up, so our $this->sag == $sag
parent::setSag($sag);
//overwrite the baked in database naming, creating it in Couch if it doesn't exist
$this->sag->setDatabase('super-database-name', true);
//obey our parent class's definitions
return $this->sag;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment