vBulletin v5.7.2

vB_Datastore
in package
Uses vB_Trait_NoSerialize

Class for fetching and initializing the vBulletin datastore from the database

Tags
date

$Date: 2022-10-20 16:24:49 -0700 (Thu, 20 Oct 2022) $

Table of Contents

BITFIELDS_PREFIX  = 'bf_'
BITFIELDS_TITLE  = 'bitfields'
__construct()  : mixed
__serialize()  : array<string|int, mixed>
__sleep()  : array<string|int, mixed>
__unserialize()  : void
__wakeup()  : void
build()  : mixed
This method replaces the legacy function build_datastore
build_options()  : array<string|int, mixed>
Reads settings from the settings then saves the values to the datastore
clearValues()  : mixed
This method is intended only for unit testing. Do NOT use it in other context.
delete()  : void
Delete a datastore entry
fetch()  : bool
Fetches the contents of the datastore from the database
get_value()  : mixed
getKeys()  : array<string|int, mixed>
Get the list of all datastore keys
getOption()  : mixed
getValue()  : mixed
init_registry()  : mixed
Temporary function to manage initializing the legacy registry from the datastore
preload()  : mixed
Set an array of items that should be preloaded. These will not be loaded immediately but will be fetched on the first call to getValue.
registerCount()  : mixed
resetCache()  : mixed
Resets datastore cache
setOption()  : mixed
setValue()  : mixed
This method is intended only for unit testing. Do NOT use it in other context.

Constants

BITFIELDS_PREFIX

public mixed BITFIELDS_PREFIX = 'bf_'

BITFIELDS_TITLE

public mixed BITFIELDS_TITLE = 'bitfields'

Methods

__construct()

public __construct(mixed &$config, mixed &$db_assertor) : mixed
Parameters
$config : mixed
$db_assertor : mixed
Return values
mixed

__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>
Return values
void

__wakeup()

public __wakeup() : void
Return values
void

build()

This method replaces the legacy function build_datastore

public build([string $title = '' ][, string $data = '' ], int $unserialize[, bool $storelocal = true ]) : mixed
Parameters
$title : string = ''
$data : string = ''
$unserialize : int
$storelocal : bool = true

-- if we should keep a local copy in memory as if this item had been loaded. This prevents the mass rebuilding of large datastore items from overloading the available memory.

Return values
mixed

build_options()

Reads settings from the settings then saves the values to the datastore

public build_options() : array<string|int, mixed>

After reading the contents of the setting table, the function will rebuild the $vbulletin->options array, then serialize the array and save that serialized array into the 'options' entry of the datastore in the database

Extracted from adminfunctions.php

Return values
array<string|int, mixed>

The $vbulletin->options array

clearValues()

This method is intended only for unit testing. Do NOT use it in other context.

public clearValues() : mixed

Clear all the cache class vars, useful to calculate every value again.

Return values
mixed

delete()

Delete a datastore entry

public delete( $title) : void
Parameters
$title :

datastore entry to delete

Return values
void

fetch()

Fetches the contents of the datastore from the database

public fetch(mixed $items) : bool
Parameters
$items : mixed
Return values
bool

get_value()

public get_value(mixed $title) : mixed
Parameters
$title : mixed
Tags
deprecated
Return values
mixed

getKeys()

Get the list of all datastore keys

public getKeys() : array<string|int, mixed>
Return values
array<string|int, mixed>

-- string array of titles of the datastore keys stored.

getOption()

public getOption(mixed $name) : mixed
Parameters
$name : mixed
Return values
mixed

getValue()

public getValue(mixed $title) : mixed
Parameters
$title : mixed
Return values
mixed

init_registry()

Temporary function to manage initializing the legacy registry from the datastore

public init_registry() : mixed
Tags
deprecated
Return values
mixed

preload()

Set an array of items that should be preloaded. These will not be loaded immediately but will be fetched on the first call to getValue.

public preload(array<string|int, mixed> $titles) : mixed
Parameters
$titles : array<string|int, mixed>
Return values
mixed

registerCount()

public registerCount() : mixed
Return values
mixed

resetCache()

Resets datastore cache

public resetCache() : mixed
Return values
mixed

setOption()

public setOption(mixed $name, mixed $value[, mixed $save = true ]) : mixed
Parameters
$name : mixed
$value : mixed
$save : mixed = true
Return values
mixed

setValue()

This method is intended only for unit testing. Do NOT use it in other context.

public setValue(string $title, mixed $value) : mixed
Parameters
$title : string
$value : mixed
Return values
mixed

Search results