Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
SMW\DIWikiPage Class Reference
Inheritance diagram for SMW\DIWikiPage:
Inheritance graph
[legend]
Collaboration diagram for SMW\DIWikiPage:
Collaboration graph
[legend]

Public Member Functions

 __construct ( $dbkey, $namespace, $interwiki='', $subobjectname='')
 
 getDIType ()
 
 getDBkey ()
 
 getNamespace ()
 
 getInterwiki ()
 
 getSubobjectName ()
 
 isSubEntityOf (string $prefix)
 
 inNamespace (int $namespace)
 
 getSha1 ()
 
 setSortKey ( $sortkey)
 
 getSortKey ()
 
 setContextReference ( $contextReference)
 
 getContextReference ()
 
 getPageLanguage ()
 
 setId ( $id)
 
 getId ()
 
 getTitle ()
 
 asBase ()
 
 getSerialization ()
 
 equals (SMWDataItem $di)
 
- Public Member Functions inherited from SMWDataItem
 getDIType ()
 
 getSortKey ()
 
 equals (SMWDataItem $di)
 
 getSortKeyDataItem ()
 
 getSerialization ()
 
 getSha1 ()
 
 getHash ()
 
 __toString ()
 
 setOption ( $key, $value)
 
 getOption ( $key, $default=null)
 

Static Public Member Functions

static doUnserialize ( $serialization)
 
static newFromTitle (Title $title)
 
static newFromText ( $text, $namespace=NS_MAIN)
 
- Static Public Member Functions inherited from SMWDataItem
static newFromSerialization ( $diType, $serialization)
 
static getDataItemClassNameForId ( $diType)
 

Protected Attributes

 $m_dbkey
 
 $m_namespace
 
 $m_interwiki
 
 $m_subobjectname
 

Additional Inherited Members

- Public Attributes inherited from SMWDataItem
const TYPE_NOTYPE = 0
 Data item ID that can be used to indicate that no data item class is appropriate.
 
const TYPE_NUMBER = 1
 Data item ID for SMWDINumber.
 
const TYPE_BLOB = 2
 Data item ID for SMWDIBlob.
 
const TYPE_BOOLEAN = 4
 Data item ID for SMWDIBoolean.
 
const TYPE_URI = 5
 Data item ID for SMWDIUri.
 
const TYPE_TIME = 6
 Data item ID for SMWDITimePoint.
 
const TYPE_GEO = 7
 Data item ID for SMWDIGeoCoord.
 
const TYPE_CONTAINER = 8
 Data item ID for SMWDIContainer.
 
const TYPE_WIKIPAGE = 9
 Data item ID for SMWDIWikiPage.
 
const TYPE_CONCEPT = 10
 Data item ID for SMWDIConcept.
 
const TYPE_PROPERTY = 11
 Data item ID for SMWDIProperty.
 
const TYPE_ERROR = 12
 Data item ID for SMWDIError.
 

Detailed Description

This class implements wiki page data items.

Since
1.6
Author
Markus Krötzsch

Constructor & Destructor Documentation

◆ __construct()

SMW\DIWikiPage::__construct (   $dbkey,
  $namespace,
  $interwiki = '',
  $subobjectname = '' 
)

Constructor. We do not bother with too much detailed validation here, regarding the known namespaces, canonicity of the dbkey (namespace exrtacted?), validity of interwiki prefix (known?), and general use of allowed characters (may depend on MW configuration). All of this would be more work than it is worth, since callers will usually be careful and since errors here do not have major consequences.

Parameters
string$dbkey
integer$namespace
string$interwiki
string$subobjectname

Member Function Documentation

◆ asBase()

SMW\DIWikiPage::asBase ( )

Returns the base part (without a fragment) of a wikipage representation.

Since
2.4
Returns
DIWikiPage

◆ doUnserialize()

static SMW\DIWikiPage::doUnserialize (   $serialization)
static

Create a data item from the provided serialization string and type ID.

Parameters
string$serialization
Returns
DIWikiPage
Exceptions
DataItemDeserializationException

◆ getContextReference()

SMW\DIWikiPage::getContextReference ( )

Returns a reference for the processing context (parser etc.).

Since
2.3
Returns
string

◆ getId()

SMW\DIWikiPage::getId ( )
Since
2.5
Returns
string

◆ getPageLanguage()

SMW\DIWikiPage::getPageLanguage ( )

Returns the page content language

Since
2.5
Returns
string

◆ getSerialization()

SMW\DIWikiPage::getSerialization ( )
Since
1.6
Returns
string

◆ getSha1()

SMW\DIWikiPage::getSha1 ( )
Since
3.1
Returns
string

◆ getSortKey()

SMW\DIWikiPage::getSortKey ( )

Get the sortkey of the wiki page data item. Note that this is not the sortkey that might have been set for the corresponding wiki page. To obtain the latter, query for the values of the property "new SMW\DIProperty( '_SKEY' )".

◆ getTitle()

SMW\DIWikiPage::getTitle ( )

Create a MediaWiki Title object for this DIWikiPage. The result can be null if an error occurred.

Returns
Title|null

◆ inNamespace()

SMW\DIWikiPage::inNamespace ( int  $namespace)
Since
3.2
Parameters
int$namespace
Returns
boolean

◆ isSubEntityOf()

SMW\DIWikiPage::isSubEntityOf ( string  $prefix)
Since
3.2
Parameters
string$prefix
Returns
boolean

◆ newFromText()

static SMW\DIWikiPage::newFromText (   $text,
  $namespace = NS_MAIN 
)
static
Since
2.1
Parameters
string$text
integernamespace
Returns
DIWikiPage

◆ newFromTitle()

static SMW\DIWikiPage::newFromTitle ( Title  $title)
static

Create a data item from a MediaWiki Title.

Parameters
Title$title
Returns
DIWikiPage

◆ setContextReference()

SMW\DIWikiPage::setContextReference (   $contextReference)
Since
2.3
Parameters
string$contextReference

◆ setId()

SMW\DIWikiPage::setId (   $id)
Since
2.5
Parameters
integer$id

◆ setSortKey()

SMW\DIWikiPage::setSortKey (   $sortkey)
Since
2.1
Parameters
string$sortkey

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

About | General disclaimer | Privacy policy