vBulletin v5.7.2

vB_Utility_Functions
in package
Uses vB_Utility_Trait_NoSerialize

Miscellanious functions that do not depend on the vBulletin Framework being initialized

Table of Contents

__serialize()  : array<string|int, mixed>
__sleep()  : array<string|int, mixed>
__unserialize()  : void
__wakeup()  : void
callSupressError()  : mixed
Call while supressing the error output
callSupressErrorArray()  : mixed
Call while supressing the error output

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(mixed $serialized) : void
Parameters
$serialized : mixed
Return values
void

__wakeup()

public __wakeup() : void
Return values
void

callSupressError()

Call while supressing the error output

public static callSupressError(int $errorsToSuppress, callable $callback, mixed ...$args) : mixed

Intended to replace @ suprression and ad hoc supressions of warnings of various kinds we do. In generally we want to avoid setting the error_reporting values everywhere and overriding the user settings. On the other hand there are cases where it just can't be avoided easily when system functions are ill behaved or php libraries aren't fully compatible with all versions.

Parameters
$errorsToSuppress : int
$callback : callable
$args : mixed
Return values
mixed

callSupressErrorArray()

Call while supressing the error output

public static callSupressErrorArray(int $errorsToSuppress, callable $callback, array<string|int, mixed> $args) : mixed

The vardaic approach doesn't play nice with reference params (either no params are ref params or all of them are which causes errors if you pass a constant. This allows specific params to be labelled references within the array.

Parameters
$errorsToSuppress : int
$callback : callable
$args : array<string|int, mixed>
Return values
mixed

Search results