vB_Node
in package
uses
vB_Trait_NoSerialize
Table of Contents
Methods
- __serialize() : array<string|int, mixed>
- __sleep() : array<string|int, mixed>
- __unserialize() : void
- __wakeup() : void
- fixNodeCount() : mixed
- This method fixes the count values for a node
- getCounts() : array<string|int, mixed>
- Calculates textcount, textunpubcount, totalcount, totalunpubcount for a nodeid.
- getExcludedTypes() : mixed
- Returns the content types that don't affect node counts and last data.
- validateClosure() : mixed
- validateRecord() : mixed
- Verifies integrity of a node in db. Checks "last" data, counts, that it has a route, etc.
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
fixNodeCount()
This method fixes the count values for a node
public
static fixNodeCount(int $nodeId) : mixed
Parameters
- $nodeId : int
-
- Node to fix
getCounts()
Calculates textcount, textunpubcount, totalcount, totalunpubcount for a nodeid.
public
static getCounts(int $nodeId) : array<string|int, mixed>
Used for fixing node counts and for verifying integrity
Parameters
- $nodeId : int
Return values
array<string|int, mixed>getExcludedTypes()
Returns the content types that don't affect node counts and last data.
public
static getExcludedTypes() : mixed
validateClosure()
public
static validateClosure(mixed $nodeid) : mixed
Parameters
- $nodeid : mixed
validateRecord()
Verifies integrity of a node in db. Checks "last" data, counts, that it has a route, etc.
public
static validateRecord(mixed $record) : mixed
This is currently only used by the unit tests and there is a replacement module for that. We are unlikely to need this as part of the app proper and if there is need for a standalone test we can adapt the test module (which is designed to not be tightly coupled to the test code).
Note that this is intended for testing and diagnostics and may be slow
Parameters
- $record : mixed
Return values
mixed —either true or an array of error strings