Semantic MediaWiki and related extensions
Public Member Functions | Protected Attributes | List of all members
SMW\SQLStore\PropertyTableDefinition Class Reference

Public Member Functions

 __construct ($DIType, $tableName, $fixedProperty=false)
 
 getFields (SQLStore $store)
 
 usesIdSubject ()
 
 setUsesIdSubject ($usesIdSubject)
 
 getFixedProperty ()
 
 isFixedPropertyTable ()
 
 getName ()
 
 getDiType ()
 

Protected Attributes

 $name
 
 $diType
 
 $fixedProperty
 
 $idSubject = true
 

Detailed Description

Simple data container for storing information about property tables. A property table is a DB table that is used to store subject-property-value records about data in SMW. Tables mostly differ in the composition of the value, but also in whether the property is explicitly named (or fixed), and in the way subject pages are referred to.

GNU GPL v2+

Since
1.8
Author
Nischay Nahata
Markus Krötzsch
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >

Constructor & Destructor Documentation

SMW\SQLStore\PropertyTableDefinition::__construct (   $DIType,
  $tableName,
  $fixedProperty = false 
)

Factory method to create an instance for a given DI type and the given table name.

Since
1.8
Parameters
integer$DITypeconstant
string$tableNamelogocal table name (not the DB version)
string | false$fixedPropertyproperty key if any

Member Function Documentation

SMW\SQLStore\PropertyTableDefinition::getDiType ( )

Returns

See also
$diType
Since
1.8
Returns
integer
SMW\SQLStore\PropertyTableDefinition::getFields ( SQLStore  $store)

Method to return the fields for this table

Since
1.8
Parameters
SQLStore$store
Returns
array
SMW\SQLStore\PropertyTableDefinition::getFixedProperty ( )

Returns the name of the fixed property which this table is for. Throws an exception when called on a table not for any fixed property, so call

See also
isFixedPropertyTable first when appropriate.
$fixedProperty
Since
1.8
Returns
string
Exceptions
OutOfBoundsException
SMW\SQLStore\PropertyTableDefinition::getName ( )

Returns the name of the table in the database.

Since
1.8
Returns
string
SMW\SQLStore\PropertyTableDefinition::isFixedPropertyTable ( )

Returns if the table holds a fixed property or is a general table.

See also
$fixedProperty
Since
1.8
Returns
boolean
SMW\SQLStore\PropertyTableDefinition::setUsesIdSubject (   $usesIdSubject)
See also
$idSubject
Parameters
$usesIdSubject
Since
1.8
SMW\SQLStore\PropertyTableDefinition::usesIdSubject ( )
See also
$idSubject
Since
1.8
Returns
boolean

Member Data Documentation

SMW\SQLStore\PropertyTableDefinition::$diType
protected
SMW\SQLStore\PropertyTableDefinition::$fixedProperty
protected
SMW\SQLStore\PropertyTableDefinition::$idSubject = true
protected
SMW\SQLStore\PropertyTableDefinition::$name
protected

The documentation for this class was generated from the following file: