本文整理汇总了PHP中WindowsAzure\Common\Internal\Utilities::getEntityId方法的典型用法代码示例。如果您正苦于以下问题:PHP Utilities::getEntityId方法的具体用法?PHP Utilities::getEntityId怎么用?PHP Utilities::getEntityId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WindowsAzure\Common\Internal\Utilities
的用法示例。
在下文中一共展示了Utilities::getEntityId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Create locator
*
* @param WindowsAzure\MediaServices\Models\Asset|string $asset A
* target asset
*
* @param WindowsAzure\MediaServices\Models\AccessPolicy|string $accessPolicy A
* target access policy
*
* @param int $type An
* enumeration value that describes the type of Locator.
*/
public function __construct($asset, $accessPolicy, $type)
{
$this->_assetId = Utilities::getEntityId($asset, 'WindowsAzure\\MediaServices\\Models\\Asset');
$this->_accessPolicyId = Utilities::getEntityId($accessPolicy, 'WindowsAzure\\MediaServices\\Models\\AccessPolicy');
$this->_type = $type;
}
示例2: getKeyDeliveryUrl
/**
* Link AssetDeliveryPolicy to Asset
*
* @param Models\Asset|string $asset Asset to link a AssetDeliveryPolicy or
* Asset id
*
* @param Models\AssetDeliveryPolicy|string $policy DeliveryPolicy to link or
* DeliveryPolicy id
*
* //@return void
*/
public function getKeyDeliveryUrl($contentKey, $contentKeyDeliveryType)
{
$contentKeyId = Utilities::getEntityId($contentKey, 'WindowsAzure\\MediaServices\\Models\\ContentKey');
$contentKeyId = urlencode($contentKeyId);
$body = json_encode(['keyDeliveryType' => $contentKeyDeliveryType]);
$method = Resources::HTTP_POST;
$path = "ContentKeys('{$contentKeyId}')/GetKeyDeliveryUrl";
$headers = array(Resources::CONTENT_TYPE => Resources::JSON_CONTENT_TYPE);
$postParams = array();
$queryParams = array();
$statusCode = Resources::STATUS_OK;
$response = $this->send($method, $headers, $postParams, $queryParams, $path, $statusCode, $body);
return simplexml_load_string($response->getBody())->__toString();
}
示例3: deleteJobTemplate
/**
* Delete job template
*
* @param WindowsAzure\MediaServices\Models\JobTemplate|string $jobTemplate Job
* template data or job template Id
*
* @return none
*/
public function deleteJobTemplate($jobTemplate)
{
$jobTemplateId = Utilities::getEntityId($jobTemplate, 'WindowsAzure\\Mediaservices\\Models\\JobTemplate');
$this->_deleteEntity("JobTemplates('{$jobTemplateId}')");
}
示例4: sendDeleteProgramOperation
/**
* Delete Program.
*
* @param WindowsAzure\MediaServices\Models\Program|string $program Program data or program Id
*
* @return none
*/
public function sendDeleteProgramOperation($program)
{
$programId = Utilities::getEntityId($program, 'WindowsAzure\\MediaServices\\Models\\Program');
return $this->_sendOperation(null, "Programs('{$programId}')", Resources::HTTP_DELETE, Resources::STATUS_NO_CONTENT);
}
示例5: deleteContentKey
/**
* Delete ContentKey
*
* @param Models\ContentKey|string $contentKey An ContentKey data or
* ContentKey Id
*
* @return none
*/
public function deleteContentKey($contentKey)
{
$contentKeyId = Utilities::getEntityId($contentKey, 'WindowsAzure\\Mediaservices\\Models\\ContentKey');
$this->_deleteEntity("ContentKeys('{$contentKeyId}')");
}