class TypeMapper

Class to map between RDF Types and PHP Classes

Methods

static string
get(string $type)

Get the registered class for an RDF type

static string
set(string $type, string $class)

Register an RDF type with a PHP Class name

static 
delete(string $type)

Delete an existing RDF type mapping.

static string
getDefaultResourceClass()

No description

static string
setDefaultResourceClass(string $class)

Sets the default resource class

Details

at line 63
static string get(string $type)

Get the registered class for an RDF type

If a type is not registered, then this method will return null.

Parameters

string $type The RDF type (e.g. foaf:Person)

Return Value

string The class name (e.g. Model_Foaf_Name)

Exceptions

InvalidArgumentException

at line 87
static string set(string $type, string $class)

Register an RDF type with a PHP Class name

Parameters

string $type The RDF type (e.g. foaf:Person)
string $class The PHP class name (e.g. Model_Foaf_Name)

Return Value

string The PHP class name

Exceptions

InvalidArgumentException

at line 112
static delete(string $type)

Delete an existing RDF type mapping.

Parameters

string $type The RDF type (e.g. foaf:Person)

Exceptions

InvalidArgumentException

at line 129
static string getDefaultResourceClass()

Return Value

string The default Resource class

at line 142
static string setDefaultResourceClass(string $class)

Sets the default resource class

Parameters

string $class The resource full class name (e.g. \MyCompany\Resource)

Return Value

string The default Resource class

Exceptions

InvalidArgumentException