vB_Library_Options
extends vB_Library
in package
vB_Library_Options
Tags
Table of Contents
Methods
- __serialize() : array<string|int, mixed>
- __sleep() : array<string|int, mixed>
- __unserialize() : void
- __wakeup() : void
- clearCache() : mixed
- deleteLocation() : mixed
- getContentInstance() : mixed
- getContentTypesList() : mixed
- getCountryCodes() : array<string|int, mixed>
- Return an array of location codes for countries.
- getLocation() : mixed
- getLocationCache() : mixed
- getLocationList() : mixed
- getLocationOption() : mixed
- getRegionCodes() : array<string|int, mixed>
- Get the region codes for a country
- getSearchImplementations() : mixed
- instance() : static
- Returns singleton instance of self.
- isLocationOptionSet() : mixed
- monitorWords() : mixed
- Checks if the text contains monitored words, and if so, sends notifications to admins and moderators if the setting is on.
- saveLocation() : mixed
- updateSetting() : array<string|int, mixed>
- This function updates specified settings
- updateValue() : mixed
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
clearCache()
public
static clearCache() : mixed
deleteLocation()
public
deleteLocation(mixed $locationid) : mixed
Parameters
- $locationid : mixed
getContentInstance()
public
static getContentInstance(mixed $contenttypeid) : mixed
Parameters
- $contenttypeid : mixed
getContentTypesList()
public
getContentTypesList([mixed $doAll = false ][, mixed $onlySuffix = false ]) : mixed
Parameters
- $doAll : mixed = false
- $onlySuffix : mixed = false
getCountryCodes()
Return an array of location codes for countries.
public
getCountryCodes() : array<string|int, mixed>
Currently we hardcode the name are returned as English names. In the future this may change.
Return values
array<string|int, mixed> —-- of the form code => country name
getLocation()
public
getLocation(mixed $locationid) : mixed
Parameters
- $locationid : mixed
getLocationCache()
public
getLocationCache() : mixed
getLocationList()
public
getLocationList() : mixed
getLocationOption()
public
getLocationOption(mixed $optionname) : mixed
Parameters
- $optionname : mixed
getRegionCodes()
Get the region codes for a country
public
getRegionCodes(string $countrycode) : array<string|int, mixed>
Geoip providers are not consistent with the subregion codes returned for non US countries (many countries have region structures that don't really fit in the country, state paradigm that geoip providers tend to use and thus what the "regions" are end up ambiguous and different implementations make different decisions). Given that, and the fact that we don't have explicit requirements for subregion designation outside of the US right now,
Parameters
- $countrycode : string
-
-- The country to get the sub regions for. If we don't have supported subregions for that country then an empty array will be returned. Currently only the US is supported.
Return values
array<string|int, mixed> —-- of the form countrycode:regioncode => name
getSearchImplementations()
public
getSearchImplementations() : mixed
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
isLocationOptionSet()
public
isLocationOptionSet(mixed $optionname) : mixed
Parameters
- $optionname : mixed
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
saveLocation()
public
saveLocation(mixed $data) : mixed
Parameters
- $data : mixed
updateSetting()
This function updates specified settings
public
updateSetting(array<string|int, mixed> $values) : array<string|int, mixed>
Parameters
- $values : array<string|int, mixed>
-
'varname' => $vbulletin->GPC['varname'], 'grouptitle' => $vbulletin->GPC['grouptitle'], 'optioncode' => $vbulletin->GPC['optioncode'], 'defaultvalue' => $vbulletin->GPC['defaultvalue'], 'displayorder' => $vbulletin->GPC['displayorder'], 'volatile' => $vbulletin->GPC['volatile'], 'datatype' => $vbulletin->GPC['datatype'], 'validationcode' => $vbulletin->GPC['validationcode'], 'product' => $vbulletin->GPC['product'], 'blacklist' => $vbulletin->GPC['blacklist'], 'title' => $vbulletin->GPC['title'], 'username' => $vbulletin->userinfo['username'], 'description' => $vbulletin->GPC['description']
Return values
array<string|int, mixed> —$response
updateValue()
public
updateValue(mixed $varname, mixed $value[, mixed $rebuild = true ]) : mixed
Parameters
- $varname : mixed
- $value : mixed
- $rebuild : mixed = true