The attached file is a class which is a PHP 5 class to perform operations on a Sesame Data Store. It is provided as a reference, and may not current with Sesame. Please go to the Drupal project page, where the latest file is in the Drupal downloads.
It has only been tested with Sesame 2.0beta5, and some functions require other parts of the library.
It also requires the Zend Framework, of which the Socket file for the HTTP client requires a small patch.
There will updates on the Drupal site, and perhaps here to keep up with changes in Sesame, contributed patches, etc.
If running on Caucho Resin server, the aggregate function can provide for an speedy substitute for SPARQLs lack of aggregate functions.