CollectionSpec
in package
Table of Contents
- $history : bool|null
- $maxExpiry : int|null
- $name : string
- $scopeName : string
- __construct() : mixed
- build() : CollectionSpec
- Static helper to keep code more readable
- export() : array<string|int, mixed>
- history() : bool|null
- Gets the history retention override setting on this collection.
- import() : CollectionSpec
- maxExpiry() : int|null
- Get the max expiry of the collection
- name() : string
- Get the name of the collection
- scopeName() : string
- Get the name of the scope which the collection belongs to
- setHistory() : CollectionSpec
- Sets the history retention override setting for this collection.
- setMaxExpiry() : CollectionSpec
- Sets the max expiry of the collection
- setName() : CollectionSpec
- Set the name of the collection
- setScopeName() : CollectionSpec
- Sets the name of the scope which the collection belongs to
Properties
$history
private
bool|null
$history
$maxExpiry
private
int|null
$maxExpiry
$name
private
string
$name
$scopeName
private
string
$scopeName
Methods
__construct()
public
__construct(string $name, string $scopeName[, int|null $maxExpiry = null ][, bool|null $history = null ]) : mixed
Parameters
- $name : string
- $scopeName : string
- $maxExpiry : int|null = null
- $history : bool|null = null
Tags
Return values
mixed —build()
Static helper to keep code more readable
public
static build(string $name, string $scopeName[, int|null $maxExpiry = null ][, bool|null $history = null ]) : CollectionSpec
Parameters
- $name : string
- $scopeName : string
- $maxExpiry : int|null = null
- $history : bool|null = null
Tags
Return values
CollectionSpec —export()
public
static export(CollectionSpec $spec) : array<string|int, mixed>
Parameters
- $spec : CollectionSpec
Tags
Return values
array<string|int, mixed> —history()
Gets the history retention override setting on this collection.
public
history() : bool|null
Only supported for Magma buckets
Tags
Return values
bool|null —import()
public
static import(array<string|int, mixed> $collection) : CollectionSpec
Parameters
- $collection : array<string|int, mixed>
Tags
Return values
CollectionSpec —maxExpiry()
Get the max expiry of the collection
public
maxExpiry() : int|null
Tags
Return values
int|null —name()
Get the name of the collection
public
name() : string
Tags
Return values
string —collection name
scopeName()
Get the name of the scope which the collection belongs to
public
scopeName() : string
Tags
Return values
string —scope name
setHistory()
Sets the history retention override setting for this collection.
public
setHistory(bool $history) : CollectionSpec
Only supported for Magma buckets.
Parameters
- $history : bool
Tags
Return values
CollectionSpec —setMaxExpiry()
Sets the max expiry of the collection
public
setMaxExpiry(int $seconds) : CollectionSpec
Parameters
- $seconds : int
-
max expiry in seconds
Tags
Return values
CollectionSpec —setName()
Set the name of the collection
public
setName(string $name) : CollectionSpec
Parameters
- $name : string
-
collection name
Tags
Return values
CollectionSpec —setScopeName()
Sets the name of the scope which the collection belongs to
public
setScopeName(string $scopeName) : CollectionSpec
Parameters
- $scopeName : string
-
scope name