PHP Класс pocketmine\metadata\MetadataStore

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
disambiguate ( pocketmine\metadata\Metadatable $subject, string $metadataKey ) : string Creates a unique name for the object receiving metadata by combining unique data from the subject with a metadataKey.
getMetadata ( mixed $subject, string $metadataKey ) : MetadataValue[] Returns all metadata values attached to an object. If multiple have attached metadata, each will value will be included.
hasMetadata ( mixed $subject, string $metadataKey ) : boolean Tests to see if a metadata attribute has been set on an object.
invalidateAll ( pocketmine\plugin\Plugin $owningPlugin ) Invalidates all metadata in the metadata store that originates from the given plugin. Doing this will force each invalidated metadata item to be recalculated the next time it is accessed.
removeMetadata ( mixed $subject, string $metadataKey, pocketmine\plugin\Plugin $owningPlugin ) Removes a metadata item owned by a plugin from a subject.
setMetadata ( mixed $subject, string $metadataKey, MetadataValue $newMetadataValue ) Adds a metadata value to an object.

Описание методов

disambiguate() абстрактный публичный Метод

Creates a unique name for the object receiving metadata by combining unique data from the subject with a metadataKey.
abstract public disambiguate ( pocketmine\metadata\Metadatable $subject, string $metadataKey ) : string
$subject pocketmine\metadata\Metadatable
$metadataKey string
Результат string

getMetadata() публичный Метод

Returns all metadata values attached to an object. If multiple have attached metadata, each will value will be included.
public getMetadata ( mixed $subject, string $metadataKey ) : MetadataValue[]
$subject mixed
$metadataKey string
Результат MetadataValue[]

hasMetadata() публичный Метод

Tests to see if a metadata attribute has been set on an object.
public hasMetadata ( mixed $subject, string $metadataKey ) : boolean
$subject mixed
$metadataKey string
Результат boolean

invalidateAll() публичный Метод

Invalidates all metadata in the metadata store that originates from the given plugin. Doing this will force each invalidated metadata item to be recalculated the next time it is accessed.
public invalidateAll ( pocketmine\plugin\Plugin $owningPlugin )
$owningPlugin pocketmine\plugin\Plugin

removeMetadata() публичный Метод

Removes a metadata item owned by a plugin from a subject.
public removeMetadata ( mixed $subject, string $metadataKey, pocketmine\plugin\Plugin $owningPlugin )
$subject mixed
$metadataKey string
$owningPlugin pocketmine\plugin\Plugin

setMetadata() публичный Метод

Adds a metadata value to an object.
public setMetadata ( mixed $subject, string $metadataKey, MetadataValue $newMetadataValue )
$subject mixed
$metadataKey string
$newMetadataValue MetadataValue