The Metadata Helper gives you the ability to manipulate metadata on vCloud objects with ease. It helps finding objects with a particular metadata (to either one particular value, or any value).
__construct(\VMware_VCloud_SDK_Service $service)
\VMware_VCloud_SDK_ServiceThe vCloud Director SDK Service
create(\VMware_VCloud_SDK_Service $service) : \VCloud\Helpers\Metadata
\VCloud\Helpers\Metadata::create($service)->queryRecords(...)
Since PHP 5.4, Class member access on instantiation is allowed:
new (\VCloud\Helpers\Metadata($service))->queryRecords(...)
\VMware_VCloud_SDK_ServiceThe vCloud Director SDK Service
\VCloud\Helpers\MetadataReturns a new Metadata Handler
doesEntryMatch(\VMware_VCloud_API_MetadataEntryType $entry, string $metadataName, string $metadataValue = null) : boolean
\VMware_VCloud_API_MetadataEntryTypeThe metadata entry to test
stringThe expected name
stringThe expected value (optional)
booleanReturns true if the entry has the expected name (and the expected value, if given)
doesObjectMatch(mixed $object, string $metadataName, string $metadataValue) : boolean
mixedThe vCloud object to test
stringThe expected name
stringThe expected value (optional)
booleanReturns true if the object contains a metadata with the
expected name (and the expected value, if given)
getObjects(string $type, string $metadataName, string $metadataValue = null) : array
stringThe expected query type, see Query helper
stringThe expected name
stringThe expected value (optional)
arrayReturns all objects containing a metadata with the expected name (and the expected value, if given)
getObject(string $type, string $metadataName, string $metadataValue = null) : mixed
stringThe expected query type, see Query helper
stringThe expected name
stringThe expected value (optional)
mixedReturns the first objects containing a metadata with the expected name (and the expected value, if given)
service : \VMware_VCloud_SDK_Service
| var |
vCloud Director SDK Service |
|---|
\VMware_VCloud_SDK_Service