PHP Interface pocketmine\metadata\Metadatable

Show file Open project: ClearSkyTeam/ClearSky Interface Usage Examples

Public Methods

Method Description
getMetadata ( string $metadataKey ) : MetadataValue[] Returns a list of previously set metadata values from the implementing object's metadata store.
hasMetadata ( string $metadataKey ) : boolean Tests to see whether the implementing object contains the given metadata value in its metadata store.
removeMetadata ( string $metadataKey, pocketmine\plugin\Plugin $owningPlugin ) : void Removes the given metadata value from the implementing object's metadata store.
setMetadata ( string $metadataKey, MetadataValue $newMetadataValue ) : void Sets a metadata value in the implementing object's metadata store.

Method Details

getMetadata() public method

Returns a list of previously set metadata values from the implementing object's metadata store.
public getMetadata ( string $metadataKey ) : MetadataValue[]
$metadataKey string
return MetadataValue[]

hasMetadata() public method

Tests to see whether the implementing object contains the given metadata value in its metadata store.
public hasMetadata ( string $metadataKey ) : boolean
$metadataKey string
return boolean

removeMetadata() public method

Removes the given metadata value from the implementing object's metadata store.
public removeMetadata ( string $metadataKey, pocketmine\plugin\Plugin $owningPlugin ) : void
$metadataKey string
$owningPlugin pocketmine\plugin\Plugin
return void

setMetadata() public method

Sets a metadata value in the implementing object's metadata store.
public setMetadata ( string $metadataKey, MetadataValue $newMetadataValue ) : void
$metadataKey string
$newMetadataValue MetadataValue
return void