vBulletin v6.0.4

vB_Entity_Styleschedule extends vB_Entity
in package
Uses vB_Trait_NoSerialize

Table of Contents

Properties

$enabled  : bool
$enddate  : string
$enddate_tzoffset  : string
$overridechannelcustom  : bool
$overrideusercustom  : bool
$priority  : int
$scheduleid  : int|null
$startdate  : string
$startdate_tzoffset  : string
$styleid  : int
$title  : string
$useyear  : bool

Methods

__construct()  : mixed
__get()  : mixed
__serialize()  : array<string|int, mixed>
__set()  : void
__sleep()  : array<string|int, mixed>
__unserialize()  : void
__wakeup()  : void
createFromArray()  : static
getNearestStartAndEndUnixtimes()  : array<string|int, mixed>
Calculate the "active" range nearest to $attimestamp, where the "nearest range" either includes the $attimestamp, or is in the earliest future range relative to $attimestamp.
jsonDecode()  : vB_Entity
Accept a json string and converts it back to an object instance. The string is intended to be an output from a json_encode($originalEntity->jsonSerialize(), true) call.
jsonSerialize()  : mixed
toArray()  : array<string|int, mixed>

Properties

Methods

__construct()

public __construct(int $styleid, bool $enabled, string $startdate, string $startdate_tzoffset, string $enddate, string $enddate_tzoffset, bool $useyear, int $priority, bool $overridechannelcustom, bool $overrideusercustom, string $title[, int|null $scheduleid = null ]) : mixed
Parameters
$styleid : int
$enabled : bool
$startdate : string
$startdate_tzoffset : string
$enddate : string
$enddate_tzoffset : string
$useyear : bool
$priority : int
$overridechannelcustom : bool
$overrideusercustom : bool
$title : string
$scheduleid : int|null = null

__get()

public final __get(string $name) : mixed
Parameters
$name : string

__serialize()

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

__set()

public final __set(string $name, mixed $value) : void
Parameters
$name : string
$value : 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>

createFromArray()

public static createFromArray(array<string|int, mixed> $dbrecord) : static
Parameters
$dbrecord : array<string|int, mixed>
Return values
static

getNearestStartAndEndUnixtimes()

Calculate the "active" range nearest to $attimestamp, where the "nearest range" either includes the $attimestamp, or is in the earliest future range relative to $attimestamp.

public getNearestStartAndEndUnixtimes(int $attimestamp) : array<string|int, mixed>

Note, this is only useful for schedules using relative dates (i.e. $this->useyear = false)

Parameters
$attimestamp : int

Unixtimestamp that we should calculate relative to. Usually timenow.

Return values
array<string|int, mixed>

[ 'startunixtime' => int, 'endunixtime' => int, ]

jsonDecode()

Accept a json string and converts it back to an object instance. The string is intended to be an output from a json_encode($originalEntity->jsonSerialize(), true) call.

public final static jsonDecode(string $json) : vB_Entity
Parameters
$json : string
Return values
vB_Entity

jsonSerialize()

public final jsonSerialize() : mixed

toArray()

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

        
On this page

Search results