Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | List of all members
SWLGroup Class Reference

Public Member Functions

 __construct ( $id, $name, array $categories, array $namespaces, array $properties, array $concepts, array $customTexts)
 
 writeToDB ()
 
 getCategories ()
 
 getNamespaces ()
 
 getProperties ()
 
 getPropertyObjects ()
 
 getConcepts ()
 
 getCustomTexts ()
 
 getSerializedCustomTexts ()
 
 getId ()
 
 getName ()
 
 coversPage (Title $title)
 
 namespacesCoversPage (Title $title)
 
 categoriesCoverPage (Title $title)
 
 conceptsCoverPage (Title $title)
 
 getWatchingUsers ()
 
 isWatchedByUser (User $user)
 
 notifyWatchingUsers (SWLChangeSet $changes)
 

Static Public Member Functions

static newFromDBResult ( $group)
 
static unserializedCustomTexts ( $customTexts)
 

Constructor & Destructor Documentation

◆ __construct()

SWLGroup::__construct (   $id,
  $name,
array  $categories,
array  $namespaces,
array  $properties,
array  $concepts,
array  $customTexts 
)

Constructor.

Since
0.1
Parameters
integer$idSet to null when creating a new group.
string$name
array$categoriesList of category names
array$namespacesList of namespace names or IDs
array$propertiesList of property names
array$conceptsList of concept names
array$customTextsList of custom texts

Member Function Documentation

◆ categoriesCoverPage()

SWLGroup::categoriesCoverPage ( Title  $title)

Returns whether the catgeories of the group cover the specified page.

Since
0.1
Parameters
Title$title
Returns
boolean

◆ conceptsCoverPage()

SWLGroup::conceptsCoverPage ( Title  $title)

Returns whether the concepts of the group cover the specified page.

Since
0.1
Parameters
Title$title
Returns
boolean

◆ coversPage()

SWLGroup::coversPage ( Title  $title)

Returns whether the group contains the specified page.

Since
0.1
Parameters
Title$title
Returns
boolean

◆ getCategories()

SWLGroup::getCategories ( )

Returns the categories specified by the group.

Since
0.1
Returns
array[string]

◆ getConcepts()

SWLGroup::getConcepts ( )

Returns the concepts specified by the group.

Since
0.1
Returns
array[string]

◆ getCustomTexts()

SWLGroup::getCustomTexts ( )

Returns the custom Texts specified for this group.

Since
0.2
Returns
array

◆ getId()

SWLGroup::getId ( )

Returns the group database id.

Since
0.1
Returns
integer

◆ getName()

SWLGroup::getName ( )

Returns the group name.

Since
0.1
Returns
string

◆ getNamespaces()

SWLGroup::getNamespaces ( )

Returns the namespaces specified by the group.

Since
0.1
Returns
array[integer]

◆ getProperties()

SWLGroup::getProperties ( )

Returns the properties specified by the group as strings (serializations of SMWDIProperty).

Since
0.1
Returns
array[string]

◆ getPropertyObjects()

SWLGroup::getPropertyObjects ( )

Returns the properties specified by the group as SMWDIProperty objects.

Since
0.1
Returns
array[SMWDIProperty]

◆ getSerializedCustomTexts()

SWLGroup::getSerializedCustomTexts ( )

Returns the serialized version of custom Texts specified for this group.

Since
0.2
Returns
array

◆ getWatchingUsers()

SWLGroup::getWatchingUsers ( )

Returns the IDs of the users watching the group.

Since
0.1
Returns
array of integer

◆ isWatchedByUser()

SWLGroup::isWatchedByUser ( User  $user)

Returns if the group is watched by the specified user or not.

Since
0.1
Parameters
User$user
Returns
boolean

◆ namespacesCoversPage()

SWLGroup::namespacesCoversPage ( Title  $title)

Returns whether the namespaces of the group cover the specified page.

Since
0.1
Parameters
Title$title
Returns
boolean

◆ newFromDBResult()

static SWLGroup::newFromDBResult (   $group)
static

Creates a new instance of SWLGroup from a DB result.

Since
0.1
Parameters
$group
Returns
SWLGroup

◆ notifyWatchingUsers()

SWLGroup::notifyWatchingUsers ( SWLChangeSet  $changes)

Gets all the watching users and passes them, together with the specified changes and the group object itself, to the SWLGroupNotify hook.

Since
0.1
Parameters
SMWChangeSet$changes

◆ unserializedCustomTexts()

static SWLGroup::unserializedCustomTexts (   $customTexts)
static

Returns the unserialized version of custom Texts specified for this group.

Returns
array

◆ writeToDB()

SWLGroup::writeToDB ( )

Writes the group to the database, either updating it when it already exists, or inserting it when it doesn't.

Since
0.1
Returns
boolean Success indicator

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

About | General disclaimer | Privacy policy