model
[ class tree: model ] [ index: model ] [ all elements ]

Class: RDF_Store_MDB

Source Location: /RDF-0.2.0/RDF/Store/MDB.php

Class Overview

RDF_Object
   |
   --RDF_Store_MDB

Store_MDB is a persistent store of RDF data using relational database technology.


Author(s):

Version:

  • V0.7

Variables

Methods


Inherited Variables

Inherited Methods

Class: RDF_Object

RDF_Object::factory()
RDF_Object::toString()
Serializes a object into a string

Class Details

[line 16]
Store_MDB is a persistent store of RDF data using relational database technology.

Store_MDB uses the MDB Library for PHP (http://pear.php.net/MDB), which allows to connect to multiple databases in a portable manner.

  • Author: Radoslaw Oldakowski <radol@gmx.de>
  • Version: V0.7
  • Access: public


[ Top ]


Class Variables

$dbConn =

[line 24]

Database connection object
  • Access: protected

Type:   object ADOConnection


[ Top ]



Method Detail

RDF_Store_MDB (Constructor)   [line 33]

RDF_Store_MDB RDF_Store_MDB( string $dsn, [string $options = null])

Set the database connection with the given parameters.
  • Access: public

Parameters:

string   $dsn   — 
string   $options   — 

[ Top ]

close   [line 201]

void close( )

Close the Store_MDB.

!!! Warning: If you close the Store_MDB all active instances of Model_MDB from this !!! Store_MDB will lose their database connection !!!

  • Access: public

[ Top ]

createTables   [line 47]

void createTables( string $filename)

Create tables and indexes for the given database type.
  • Throws: PhpError
  • Access: public

Parameters:

string   $filename   — 

[ Top ]

getModel   [line 118]

object Model_MDB getModel( string $modelURI)

Create a new instance of Model_MDB with the given $modelURI and load the corresponding values of modelID and baseURI from the database.

Return FALSE if the Model_MDB does not exist.

  • Access: public

Parameters:

string   $modelURI   — 

[ Top ]

getNewModel   [line 143]

object Model_MDB getNewModel( string $modelURI, [string $baseURI = null])

Create a new instance of Model_MDB with the given $modelURI and insert the Model_MDB variables into the database.

Return FALSE if there is already a model with the given URI.

  • Throws: SqlError
  • Access: public

Parameters:

string   $modelURI   — 
string   $baseURI   — 

[ Top ]

listModels   [line 81]

array listModels( )

List all Model_MDBs stored in the database.
  • Throws: SqlError
  • Access: public

[ Top ]

modelExists   [line 95]

boolean modelExists( string $modelURI)

Check if the Model_MDB with the given modelURI is already stored in the database
  • Throws: SqlError
  • Access: public

Parameters:

string   $modelURI   — 

[ Top ]

putModel   [line 178]

boolean putModel( object Model &$model, [string $modelURI = null])

Store a Model_Memory or another Model_MDB from a different Store_MDB in the database.

Return FALSE if there is already a model with modelURI matching the modelURI of the given model.

  • Access: public

Parameters:

object Model   &$model   — 
string   $modelURI   — 

[ Top ]

_createUniqueModelID   [line 216]

integer _createUniqueModelID( )

Create a unique ID for the Model_MDB to be insert into the models table.

This method was implemented because some databases do not support auto-increment.

  • Access: protected

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:39:28 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.