SMWDIWikiPage Class Reference
[SMWDataItems]

This class implements wiki page data items. More...

Inherits SMWDataItem.

List of all members.

Public Member Functions

 __construct ($dbkey, $namespace, $interwiki, $subobjectname= '')
 Contructor.
 getDIType ()
 Convenience method that returns a constant that defines the concrete class that implements this data item.
 getDBkey ()
 getNamespace ()
 getInterwiki ()
 getSubobjectName ()
 getSortKey ()
 Get the sortkey of the wiki page data item.
 getTitle ()
 Create a MediaWiki Title object for this SMWDIWikiPage.
 getSerialization ()
 Get a UTF-8 encoded string serialization of this data item.

Static Public Member Functions

static doUnserialize ($serialization)
 Create a data item from the provided serialization string and type ID.
static newFromTitle (Title $title)
 Create a data item from a MediaWiki Title.

Protected Attributes

 $m_dbkey
 $m_namespace
 $m_interwiki
 $m_subobjectname


Detailed Description

This class implements wiki page data items.

Since:
1.6
Author:
Markus Krötzsch

Definition at line 15 of file SMW_DI_WikiPage.php.


Constructor & Destructor Documentation

SMWDIWikiPage::__construct ( dbkey,
namespace,
interwiki,
subobjectname = '' 
)

Contructor.

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.

Definition at line 47 of file SMW_DI_WikiPage.php.


Member Function Documentation

SMWDIWikiPage::getDIType (  ) 

Convenience method that returns a constant that defines the concrete class that implements this data item.

Used to switch when processing data items.

Returns:
integer that specifies the basic type of data item

Reimplemented from SMWDataItem.

Definition at line 58 of file SMW_DI_WikiPage.php.

References SMWDataItem::TYPE_WIKIPAGE.

SMWDIWikiPage::getDBkey (  ) 

SMWDIWikiPage::getNamespace (  ) 

Definition at line 66 of file SMW_DI_WikiPage.php.

Referenced by newFromTitle().

SMWDIWikiPage::getInterwiki (  ) 

Definition at line 70 of file SMW_DI_WikiPage.php.

Referenced by newFromTitle().

SMWDIWikiPage::getSubobjectName (  ) 

SMWDIWikiPage::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 SMWDIProperty( '_SKEY' )".

Reimplemented from SMWDataItem.

Definition at line 84 of file SMW_DI_WikiPage.php.

SMWDIWikiPage::getTitle (  ) 

Create a MediaWiki Title object for this SMWDIWikiPage.

The result can be null if an error occurred.

Todo:
From MW 1.17 on, makeTitleSafe supports interwiki prefixes. This function can be simplified when compatibility to MW 1.16 is dropped.
Returns:
mixed Title or null

Definition at line 97 of file SMW_DI_WikiPage.php.

SMWDIWikiPage::getSerialization (  ) 

Get a UTF-8 encoded string serialization of this data item.

The serialisation should be concise and need not be pretty, but it must allow unserialization. Each subclass of SMWDataItem implements a static method doUnserialize() for this purpose.

Returns:
string

Reimplemented from SMWDataItem.

Definition at line 107 of file SMW_DI_WikiPage.php.

static SMWDIWikiPage::doUnserialize ( serialization  )  [static]

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

Returns:
SMWDIWikiPage

Definition at line 120 of file SMW_DI_WikiPage.php.

static SMWDIWikiPage::newFromTitle ( Title $  title  )  [static]


Member Data Documentation

SMWDIWikiPage::$m_dbkey [protected]

Definition at line 21 of file SMW_DI_WikiPage.php.

SMWDIWikiPage::$m_namespace [protected]

Definition at line 26 of file SMW_DI_WikiPage.php.

SMWDIWikiPage::$m_interwiki [protected]

Definition at line 31 of file SMW_DI_WikiPage.php.

SMWDIWikiPage::$m_subobjectname [protected]

Definition at line 37 of file SMW_DI_WikiPage.php.


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

Generated on Sun Mar 18 07:15:43 2012 for Semantic MediaWiki by  doxygen 1.5.6