PHP 클래스 pocketmine\metadata\MetadataStore

파일 보기 프로젝트 열기: ClearSkyTeam/ClearSky 1 사용 예제들

공개 메소드들

메소드 설명
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