vB_Library_Prefix
extends vB_Library
in package
vB_Library
Table of Contents
Methods
- __serialize() : array<string|int, mixed>
- __sleep() : array<string|int, mixed>
- __unserialize() : void
- __wakeup() : void
- buildDatastore() : mixed
- Rebuilds the prefix datastore
- clearCache() : mixed
- getContentInstance() : mixed
- getPrefixData() : mixed
- Get the prefix datastore. If it does not exist, rebuild it.
- instance() : static
- Returns singleton instance of self.
- monitorWords() : mixed
- Checks if the text contains monitored words, and if so, sends notifications to admins and moderators if the setting is on.
- prefixExists() : bool
- Does the given prefix exist?
Methods
__serialize()
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>__sleep()
public
__sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>__unserialize()
public
__unserialize(array<string|int, mixed> $serialized) : void
Parameters
- $serialized : array<string|int, mixed>
__wakeup()
public
__wakeup() : void
buildDatastore()
Rebuilds the prefix datastore
public
buildDatastore() : mixed
Datastore looks like 'prefixes' -- array of 'prefixsetid' => list of prefixes 'restrictions' -- array of 'prefixid' => list of restricted usergroups, 'channelPrefixset' -- array of 'channelid' => list of prefeix sets,
clearCache()
public
static clearCache() : mixed
getContentInstance()
public
static getContentInstance(mixed $contenttypeid) : mixed
Parameters
- $contenttypeid : mixed
getPrefixData()
Get the prefix datastore. If it does not exist, rebuild it.
public
getPrefixData() : mixed
This should be the only way the prefixcache datastore is accessed
instance()
Returns singleton instance of self.
public
static instance(mixed $class) : static
Parameters
- $class : mixed
Return values
static —- Reference to singleton instance of the requested library class
monitorWords()
Checks if the text contains monitored words, and if so, sends notifications to admins and moderators if the setting is on.
public
monitorWords(mixed $text, mixed $type, mixed $nodeid[, mixed $userid = null ][, mixed $insertNotifications = true ][, mixed $currentuserid = 0 ]) : mixed
Parameters
- $text : mixed
- $type : mixed
- $nodeid : mixed
- $userid : mixed = null
- $insertNotifications : mixed = true
- $currentuserid : mixed = 0
Tags
prefixExists()
Does the given prefix exist?
public
prefixExists(string $prefixid) : bool
Parameters
- $prefixid : string