FilterInterface
in
Table of Contents
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.
- setKinds() : static
- Set the kinds for the Filter object.
- setLimit() : static
- Set the limit for the Filter object.
- setLowercaseETags() : static
- Set the 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.
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> $pubkey) : static
Parameters
- $pubkey : array<string|int, mixed>
-
The array of authors to set.
Return values
staticsetKinds()
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
staticsetLimit()
Set the limit for the Filter object.
public
setLimit(int $limit) : static
Parameters
- $limit : int
-
The limit to set.
Return values
staticsetLowercaseETags()
Set the tag for the Filter object.
public
setLowercaseETags(array<string|int, mixed> $tag) : static
Parameters
- $tag : array<string|int, mixed>
-
The array of tag to set.
Return values
staticsetLowercasePTags()
Set the #p tag for the Filter object.
public
setLowercasePTags(array<string|int, mixed> $ptag) : static
Parameters
- $ptag : array<string|int, mixed>
-
The array of tag to set.
Return values
staticsetSince()
Set the since for the Filter object.
public
setSince(int $since) : static
Parameters
- $since : int
-
The limit to set.
Return values
staticsetUntil()
Set the until for the Filter object.
public
setUntil(int $until) : static
Parameters
- $until : int
-
The limit to set.
Return values
statictoArray()
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.