Documentation

Filter
in package
implements FilterInterface

Table of Contents

Interfaces

FilterInterface

Properties

$authors  : array<string|int, mixed>
A list of lowercase pubkeys, the pubkey of an event must be one of these
$etags  : array<string|int, mixed>
A list of #e tag values (list of event ids)
$ids  : array<string|int, mixed>
A list of event ids
$kinds  : array<string|int, mixed>
A list of a kind numbers
$limit  : int
Maximum number of events relays SHOULD return in the initial query
$ptags  : array<string|int, mixed>
A list of #p tag values (list of pubkeys).
$since  : int
An integer unix timestamp in seconds, events must be newer than this to pass
$until  : int
An integer unix timestamp in seconds, events must be older than this to pass

Methods

isLowercaseHex()  : bool
Check if a given string is a 64-character lowercase hexadecimal value.
isValidTimestamp()  : bool
Check if a given timestamp is valid.
setAuthors()  : static
Set the authors for the Filter object.
setIds()  : $this
Set the ids for filtering multiple events.
setKinds()  : static
Set the kinds for the Filter object.
setLimit()  : static
Set the limit for the Filter object.
setLowercaseETags()  : static
Set the #e tag for the Filter object.
setLowercasePTags()  : static
Set the #p tag for the Filter object.
setSince()  : static
Set the since for the Filter object.
setUntil()  : static
Set the until for the Filter object.
toArray()  : array<string|int, mixed>
Return an array representation of the object by iterating through its properties.

Properties

$authors

A list of lowercase pubkeys, the pubkey of an event must be one of these

public array<string|int, mixed> $authors

$etags

A list of #e tag values (list of event ids)

public array<string|int, mixed> $etags

$ids

A list of event ids

public array<string|int, mixed> $ids

$kinds

A list of a kind numbers

public array<string|int, mixed> $kinds

$limit

Maximum number of events relays SHOULD return in the initial query

public int $limit

$ptags

A list of #p tag values (list of pubkeys).

public array<string|int, mixed> $ptags

$since

An integer unix timestamp in seconds, events must be newer than this to pass

public int $since

$until

An integer unix timestamp in seconds, events must be older than this to pass

public int $until

Methods

isLowercaseHex()

Check if a given string is a 64-character lowercase hexadecimal value.

public isLowercaseHex(string $string) : bool
Parameters
$string : string

The string to check.

Return values
bool

True if the string is a 64-character lowercase hexadecimal value, false otherwise.

isValidTimestamp()

Check if a given timestamp is valid.

public isValidTimestamp(mixed $timestamp) : bool
Parameters
$timestamp : mixed

The timestamp to check.

Return values
bool

True if the timestamp is valid, false otherwise.

setAuthors()

Set the authors for the Filter object.

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

setIds()

Set the ids for filtering multiple events.

public setIds(array<string|int, mixed> $ids) : $this
Parameters
$ids : array<string|int, mixed>
Return values
$this

setKinds()

Set the kinds for the Filter object.

public setKinds(array<string|int, mixed> $kinds) : static
Parameters
$kinds : array<string|int, mixed>

The array of kinds to set.

Return values
static

setLimit()

Set the limit for the Filter object.

public setLimit(int $limit) : static
Parameters
$limit : int

The limit to set.

Return values
static

setLowercaseETags()

Set the #e tag for the Filter object.

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

setLowercasePTags()

Set the #p tag for the Filter object.

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

setSince()

Set the since for the Filter object.

public setSince(int $since) : static
Parameters
$since : int

The limit to set.

Return values
static

setUntil()

Set the until for the Filter object.

public setUntil(int $until) : static
Parameters
$until : int

The limit to set.

Return values
static

toArray()

Return an array representation of the object by iterating through its properties.

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

The array representation of the object.


        
On this page

Search results