Class LibRDF_Storage

Description

A wrapper around the librdf_storage datatype.

Located in /Storage.php (line 47)


	
			
Method Summary
void __construct ([string $storage_name = "memory"], [string $name = NULL], [string $options = NULL])
void __destruct ()
resource getStorage ()
void __clone ()
Methods
Constructor __construct (line 104)

Creates a new storage backend.

The storage methods available depends on the librdf configuration. Methods always available are `memory', `hashes', `file' and `uri'. Optional methods are `bdb', `mysql' and `sqllite'. The default is `memory'.

The name argument is mandatory for storage methods that required a named handle, such as file and URI.

  1. $stor new LibRDF_Storage(storage_name="file"name="/tmp/filename");

The options string passes storage_name specific options to the chosen backend and uses the following form:

  1. $stor new LibRDF_Storage("storage_name""name",
  2.               "key1='value1', key2='value2', ...");

Options values must be surrounded by single quotes for multiple key/option pairs.

The options common to all storage methods are: new - optional boolean (default false) If true, delete any existing store and create a new one, otherwise open an existing store.

write - optional boolean (default true) If true, open the store in read-write mode.

For hashes: hash-type - the name of any supported hash type (default 'memory') 'memory' and 'file' hash types are always present, and 'bdb' may be available depending on compile-time configuration of librdf.

dir - (default '.') the directory in which to create files

mode - (default 0644) the octal file mode with which to create files

  • access: public
  • throws: LibRDF_Error If unable to create a new storage
void __construct ([string $storage_name = "memory"], [string $name = NULL], [string $options = NULL])
  • string $storage_name: The type of storage to use
  • string $name: A name for the storage handle
  • string $options: Options for the storage backend
Destructor __destruct (line 121)

Free the storage's resources.

  • access: public
void __destruct ()
getStorage (line 157)

Return the underlying storage resource.

This function is intended for other LibRDF classes and should not be called.

  • return: The storage resource
  • access: public
resource getStorage ()
__clone (line 139)

Create a new storage in the same context as an existing storage.

When cloning a storage object, a new storage will be opened using the same options as the existing one. This may mean generating new identifiers for files based on the existing identifier.

  • access: public
  • throws: LibRDF_Error If unable to copy the storage
void __clone ()

Documentation generated on Thu, 15 Jun 2006 19:25:13 -0400 by phpDocumentor 1.3.0