Semantic MediaWiki and related extensions
Public Member Functions | Public Attributes | 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)
 
 isTableType (string $tableType)
 
 setTableType (string $tableType)
 
 getFixedProperty ()
 
 isFixedPropertyTable ()
 
 getName ()
 
 getDiType ()
 

Public Attributes

const TYPE_CORE = 'type/core'
 
const TYPE_CUSTOM = 'type/custom'
 

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

◆ __construct()

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

◆ getDiType()

SMW\SQLStore\PropertyTableDefinition::getDiType ( )

Returns

See also
$diType
Since
1.8
Returns
integer

◆ getFields()

SMW\SQLStore\PropertyTableDefinition::getFields ( SQLStore  $store)

Method to return the fields for this table

Since
1.8
Parameters
SQLStore$store
Returns
array

◆ getFixedProperty()

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

◆ getName()

SMW\SQLStore\PropertyTableDefinition::getName ( )

Returns the name of the table in the database.

Since
1.8
Returns
string

◆ isFixedPropertyTable()

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

◆ isTableType()

SMW\SQLStore\PropertyTableDefinition::isTableType ( string  $tableType)
Since
3.2
Parameters
string$tableType
Returns
boolean

◆ setTableType()

SMW\SQLStore\PropertyTableDefinition::setTableType ( string  $tableType)
Since
3.2
Parameters
string$tableType

◆ setUsesIdSubject()

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

◆ usesIdSubject()

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

Member Data Documentation

◆ TYPE_CORE

const SMW\SQLStore\PropertyTableDefinition::TYPE_CORE = 'type/core'

A table that is part of Semantic MediaWiki core.

◆ TYPE_CUSTOM

const SMW\SQLStore\PropertyTableDefinition::TYPE_CUSTOM = 'type/custom'

A custom table added for example by an extension.


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

About | General disclaimer | Privacy policy