vB_Library_External
extends vB_Library
in package
vB_Library_External
Table of Contents
Constants
- ROUTE_PATH = '/external'
Methods
- __serialize() : array<string|int, mixed>
- __sleep() : array<string|int, mixed>
- __unserialize() : void
- __wakeup() : void
- checkExternalForChannels() : array<string|int, mixed>
- Check if the external data provider type is available and it actually produces a valid output for given channels.
- clearCache() : mixed
- getContentInstance() : mixed
- getExternalDataForChannels() : array<string|int, mixed>
- Get external data information for each channel specified such as external type is actually available, produces a valid output for channel and external route.
- getExternalRoute() : string
- Builds an external data provider route depending on the data specified and options to consider.
- getExternalRouteForChannels() : array<string|int, mixed>
- Build external type route for each individual channel specified.
- 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.
- validateExternalType() : array<string|int, mixed>
- Perform checks on the given external type.
Constants
ROUTE_PATH
public
mixed
ROUTE_PATH
= '/external'
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
checkExternalForChannels()
Check if the external data provider type is available and it actually produces a valid output for given channels.
public
checkExternalForChannels(mixed $channelids, mixed $type) : array<string|int, mixed>
Parameters
- $channelids : mixed
- $type : mixed
Return values
array<string|int, mixed> —Associative array with external status information for each given channel. Status will be added to each array element as '$type_enabled' key.
clearCache()
public
static clearCache() : mixed
getContentInstance()
public
static getContentInstance(mixed $contenttypeid) : mixed
Parameters
- $contenttypeid : mixed
getExternalDataForChannels()
Get external data information for each channel specified such as external type is actually available, produces a valid output for channel and external route.
public
getExternalDataForChannels(mixed $channelids, mixed $type) : array<string|int, mixed>
Parameters
- $channelids : mixed
- $type : mixed
Return values
array<string|int, mixed> —Associative array with external data for each given channel. Status will be added to each array element as '$type_enabled' key. Status will be added to each array element as '$type_route' key.
getExternalRoute()
Builds an external data provider route depending on the data specified and options to consider.
public
getExternalRoute([mixed $data = array() ][, mixed $options = array() ]) : string
Parameters
- $data : mixed = array()
- $options : mixed = array()
Return values
string —External route.
getExternalRouteForChannels()
Build external type route for each individual channel specified.
public
getExternalRouteForChannels(mixed $channelids, mixed $type) : array<string|int, mixed>
Parameters
- $channelids : mixed
- $type : mixed
Return values
array<string|int, mixed> —Associative array with external route for each given channel. Status will be added to each array element as '$type_route' key.
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
validateExternalType()
Perform checks on the given external type.
public
validateExternalType(mixed $type) : array<string|int, mixed>
Parameters
- $type : mixed
Return values
array<string|int, mixed> —'valid' defines whether external type is valid or not. 'phraseid' used in case of not valid type.