vB_Library_Functions
extends vB_Library
in package
vB_Library_Functions
Tags
Table of Contents
Properties
- $lastError : mixed
Methods
- __serialize() : array<string|int, mixed>
- __sleep() : array<string|int, mixed>
- __unserialize() : void
- __wakeup() : void
- addSlashesJs() : string
- Escapes quotes in strings destined for Javascript (Taken from includes/functions.php)
- clearCache() : mixed
- fetchVersionArray() : array<string|int, mixed>
- Converts a version number string into an array that can be parsed to determine if which of several version strings is the newest.
- fileRead() : string
- Returns the contents of a file
- fileWrite() : mixed
- Writes data to a file
- getContentInstance() : mixed
- getLastError() : mixed
- installProduct() : bool
- Installs a product from the xml text, currently calls the legacy function
- installProductTranslations() : mixed
- installProductXML() : bool
- Installs a product from the xml text, currently calls the legacy function
- instance() : static
- Returns singleton instance of self.
- isNewerVersion() : bool
- Compares two version strings.
- monitorWords() : mixed
- Checks if the text contains monitored words, and if so, sends notifications to admins and moderators if the setting is on.
- vbMkdir() : mixed
Properties
$lastError
public
static mixed
$lastError
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
addSlashesJs()
Escapes quotes in strings destined for Javascript (Taken from includes/functions.php)
public
static addSlashesJs(mixed $text[, mixed $quotetype = "'" ]) : string
Parameters
- $text : mixed
- $quotetype : mixed = "'"
Return values
stringclearCache()
public
static clearCache() : mixed
fetchVersionArray()
Converts a version number string into an array that can be parsed to determine if which of several version strings is the newest.
public
static fetchVersionArray(mixed $version) : array<string|int, mixed>
Parameters
- $version : mixed
Return values
array<string|int, mixed> —Array of 6 bits, in decreasing order of influence; a higher bit value is newer
fileRead()
Returns the contents of a file
public
static fileRead(mixed $path) : string
Parameters
- $path : mixed
Return values
string —If file does not exist, returns an empty string
fileWrite()
Writes data to a file
public
static fileWrite(mixed $path, mixed $data[, mixed $backup = false ]) : mixed
Parameters
- $path : mixed
- $data : mixed
- $backup : mixed = false
getContentInstance()
public
static getContentInstance(mixed $contenttypeid) : mixed
Parameters
- $contenttypeid : mixed
getLastError()
public
static getLastError() : mixed
installProduct()
Installs a product from the xml text, currently calls the legacy function
public
static installProduct(mixed $product[, mixed $path = '' ][, mixed $filename = '' ][, mixed $overwrite = false ][, mixed $printinfo = false ][, mixed $deferRebuild = false ]) : bool
Parameters
- $product : mixed
- $path : mixed = ''
- $filename : mixed = ''
- $overwrite : mixed = false
- $printinfo : mixed = false
- $deferRebuild : mixed = false
Return values
bool —True if the product requires a template merge, false otherwise
installProductTranslations()
public
static installProductTranslations(mixed $product, mixed $productxmldir) : mixed
Parameters
- $product : mixed
- $productxmldir : mixed
installProductXML()
Installs a product from the xml text, currently calls the legacy function
public
static installProductXML(mixed $xml[, mixed $overwrite = false ][, mixed $printinfo = false ][, mixed $deferRebuild = false ]) : bool
Parameters
- $xml : mixed
- $overwrite : mixed = false
- $printinfo : mixed = false
- $deferRebuild : mixed = false
Return values
bool —True if the product requires a template merge, false otherwise
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
isNewerVersion()
Compares two version strings.
public
static isNewerVersion(mixed $new_version_str, mixed $cur_version_str[, mixed $check_same = false ]) : bool
Returns true if the first is newer than the second. Returns true if 'check_same' is set and the versions are equal.
Parameters
- $new_version_str : mixed
- $cur_version_str : mixed
- $check_same : mixed = false
Return values
bool —True or False
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
vbMkdir()
public
static vbMkdir(mixed $path[, mixed $mode = 0777 ]) : mixed
Parameters
- $path : mixed
- $mode : mixed = 0777