PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
pocketmine\metadata\MetadataStore Class Reference
+ Inheritance diagram for pocketmine\metadata\MetadataStore:
+ Collaboration diagram for pocketmine\metadata\MetadataStore:

Public Member Functions

 setMetadata ($subject, $metadataKey, MetadataValue $newMetadataValue)
 
 getMetadata ($subject, $metadataKey)
 
 hasMetadata ($subject, $metadataKey)
 
 removeMetadata ($subject, $metadataKey, Plugin $owningPlugin)
 
 disambiguate (Metadatable $subject, $metadataKey)
 

Detailed Description

Definition at line 30 of file MetadataStore.php.

Member Function Documentation

pocketmine\metadata\MetadataStore::disambiguate ( Metadatable  $subject,
  $metadataKey 
)
abstract

Creates a unique name for the object receiving metadata by combining unique data from the subject with a metadataKey.

Parameters
Metadatable$subject
string$metadataKey
Returns
string
Exceptions
\InvalidArgumentException

Referenced by pocketmine\metadata\MetadataStore\getMetadata(), pocketmine\metadata\MetadataStore\hasMetadata(), pocketmine\metadata\MetadataStore\removeMetadata(), and pocketmine\metadata\MetadataStore\setMetadata().

+ Here is the caller graph for this function:

pocketmine\metadata\MetadataStore::getMetadata (   $subject,
  $metadataKey 
)

Returns all metadata values attached to an object. If multiple have attached metadata, each will value will be included.

Parameters
mixed$subject
string$metadataKey
Returns
MetadataValue[]
Exceptions
\Exception

Definition at line 70 of file MetadataStore.php.

References pocketmine\metadata\MetadataStore\disambiguate().

+ Here is the call graph for this function:

pocketmine\metadata\MetadataStore::hasMetadata (   $subject,
  $metadataKey 
)

Tests to see if a metadata attribute has been set on an object.

Parameters
mixed$subject
string$metadataKey
Returns
bool
Exceptions
\Exception

Definition at line 89 of file MetadataStore.php.

References pocketmine\metadata\MetadataStore\disambiguate().

+ Here is the call graph for this function:

pocketmine\metadata\MetadataStore::removeMetadata (   $subject,
  $metadataKey,
Plugin  $owningPlugin 
)

Removes a metadata item owned by a plugin from a subject.

Parameters
mixed$subject
string$metadataKey
Plugin$owningPlugin
Exceptions
\Exception

Definition at line 102 of file MetadataStore.php.

References pocketmine\metadata\MetadataStore\disambiguate().

+ Here is the call graph for this function:

pocketmine\metadata\MetadataStore::setMetadata (   $subject,
  $metadataKey,
MetadataValue  $newMetadataValue 
)

Adds a metadata value to an object.

Parameters
mixed$subject
string$metadataKey
MetadataValue$newMetadataValue
Exceptions
\Exception

Definition at line 43 of file MetadataStore.php.

References pocketmine\metadata\MetadataStore\disambiguate(), and pocketmine\metadata\MetadataValue\getOwningPlugin().

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: