GuildMemberStorage
class GuildMemberStorage extends Storage implements GuildMemberStorageInterface (View source)
Guild Member Storage to store guild members, utilizes Collection.
Properties
protected Client | $client | The client this storage belongs to. | from Storage |
protected array | $baseStorageArgs | Basic storage args. | from Storage |
protected Guild | $guild | The guild this storage belongs to. |
Methods
Determines if a given key exists in the collection.
Returns the item at a given key. If the key does not exist, null is returned.
Sets a key-value pair.
Removes an item.
Filters the storage by a given callback, keeping only those items that pass a given truth test. Returns a new Storage instance.
Sorts the collection. Returns a new Storage instance.
Sorts the collection by key. Returns a new Storage instance.
Sorts the collection using a custom sorting function. Returns a new Storage instance.
Sorts the collection by key using a custom sorting function. Returns a new Storage instance.
Factory to create (or retrieve existing) guild members.
Details
at line 63
bool
has(mixed $key)
Determines if a given key exists in the collection.
at line 72
mixed|null
get(mixed $key)
Returns the item at a given key. If the key does not exist, null is returned.
at line 82
$this
set(mixed $key, mixed $value)
Sets a key-value pair.
at line 92
$this
delete(mixed $key)
Removes an item.
StorageInterface
copy()
Returns a copy of itself. This does not make a copy of the stored data.
StorageInterface
filter(callable $closure)
Filters the storage by a given callback, keeping only those items that pass a given truth test. Returns a new Storage instance.
StorageInterface
sort(bool $descending = false, int $options = \SORT_REGULAR)
Sorts the collection. Returns a new Storage instance.
Collection
sortKey(bool $descending = false, int $options = \SORT_REGULAR)
Sorts the collection by key. Returns a new Storage instance.
Collection
sortCustom(callable $closure)
Sorts the collection using a custom sorting function. Returns a new Storage instance.
Collection
sortCustomKey(callable $closure)
Sorts the collection by key using a custom sorting function. Returns a new Storage instance.
at line 38
GuildMember
resolve(GuildMember|User|string|int $guildmember)
Resolves given data to a guildmember.
at line 103
GuildMember
factory(array $data)
Factory to create (or retrieve existing) guild members.