Xataface 2.0
Xataface Application Framework
Public Member Functions | Static Public Member Functions | Data Fields
Dataface_Ontology Class Reference
Inheritance diagram for Dataface_Ontology:
Dataface_Ontology_Event Dataface_Ontology_Person

Public Member Functions

 Dataface_Ontology ($tablename)
& getAttributes ()
& getAttribute ($name)
& newIndividual (&$record)
& newOntology ($type, $tablename)
 buildAttributes ()
 getFieldname ($attname)
 _is ($method, $attname)
 validate ($attname, $value, $allowBlanks=true)
 getType ($attname)
 isDate ($attname)
 isBlob ($attname)
 isContainer ($attname)
 isPassword ($attname)
 isText ($attname)
 isXML ($attname)
 isChar ($attname)
 isInt ($attname)
 isFloat ($attname)

Static Public Member Functions

static registerType ($type, $path, $class)
static & getRegisteredOntologies ()

Data Fields

 $table
 $attributes
 $fieldnames
 $relationships

Detailed Description

Dataface_Ontology is an abstract base class for classes that are meant to sit on top of Records to allow them to be treated as abstract data types.

an ontology is a data model that represents a set of concepts within a domain and the relationships between those concepts. It is used to reason about the objects within that domain.

See also:
http://en.wikipedia.org/wiki/Ontology_%28computer_science%29

Definition at line 12 of file Ontology.php.


Member Function Documentation

_is ( $  method,
$  attname 
)

A catch-all function that is used by isDate(), isBlob(), etc.. to cut down on repetitive programming.

Parameters:
string$methodThe name of the method to call.
string$attnameThe name of the attribute that the method should act upon.

Definition at line 95 of file Ontology.php.

buildAttributes ( )

Reimplemented in Dataface_Ontology_Event, and Dataface_Ontology_Person.

Definition at line 66 of file Ontology.php.

Dataface_Ontology ( $  tablename)

Definition at line 19 of file Ontology.php.

& getAttribute ( $  name)

Definition at line 30 of file Ontology.php.

& getAttributes ( )

Definition at line 23 of file Ontology.php.

getFieldname ( $  attname)

Definition at line 70 of file Ontology.php.

static& getRegisteredOntologies ( ) [static]

Definition at line 60 of file Ontology.php.

getType ( $  attname)

Definition at line 122 of file Ontology.php.

isBlob ( $  attname)

Definition at line 124 of file Ontology.php.

isChar ( $  attname)

Definition at line 129 of file Ontology.php.

isContainer ( $  attname)

Definition at line 125 of file Ontology.php.

isDate ( $  attname)

Definition at line 123 of file Ontology.php.

isFloat ( $  attname)

Definition at line 131 of file Ontology.php.

isInt ( $  attname)

Definition at line 130 of file Ontology.php.

isPassword ( $  attname)

Definition at line 126 of file Ontology.php.

isText ( $  attname)

Definition at line 127 of file Ontology.php.

isXML ( $  attname)

Definition at line 128 of file Ontology.php.

& newIndividual ( &$  record)

Definition at line 38 of file Ontology.php.

& newOntology ( $  type,
$  tablename 
)

Definition at line 43 of file Ontology.php.

static registerType ( $  type,
$  path,
$  class 
) [static]

Definition at line 54 of file Ontology.php.

validate ( $  attname,
$  value,
$  allowBlanks = true 
)

Validates a particular value to see if it is a valid value for that attribute. This will call the validate_$attname method of this ontology if it exists, otherwise it will just return true.

Parameters:
string$attnameThe name of the attribute against which the value should be validated.
mixed$valueThe value that is being validated.
boolean$allowBlanksTrue if the validator should allow blank values.
Returns:
boolean True if it is ok.. false otherwise.

Definition at line 112 of file Ontology.php.


Field Documentation

$attributes

Definition at line 15 of file Ontology.php.

$fieldnames

Definition at line 16 of file Ontology.php.

$relationships

Definition at line 17 of file Ontology.php.

$table

Definition at line 14 of file Ontology.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations