repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
Azure/azure-sdk-for-php | src/Common/Internal/Atom/Feed.php | Feed.setAuthor | public function setAuthor(array $author)
{
$person = new Person();
foreach ($author as $authorInstance) {
Validate::isInstanceOf($authorInstance, $person, 'author');
}
$this->author = $author;
} | php | public function setAuthor(array $author)
{
$person = new Person();
foreach ($author as $authorInstance) {
Validate::isInstanceOf($authorInstance, $person, 'author');
}
$this->author = $author;
} | [
"public",
"function",
"setAuthor",
"(",
"array",
"$",
"author",
")",
"{",
"$",
"person",
"=",
"new",
"Person",
"(",
")",
";",
"foreach",
"(",
"$",
"author",
"as",
"$",
"authorInstance",
")",
"{",
"Validate",
"::",
"isInstanceOf",
"(",
"$",
"authorInstanc... | Sets the author of the feed.
@param array $author The author of the feed | [
"Sets",
"the",
"author",
"of",
"the",
"feed",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/Common/Internal/Atom/Feed.php#L258-L265 | train |
Azure/azure-sdk-for-php | src/Common/Internal/Atom/Feed.php | Feed.setCategory | public function setCategory(array $category)
{
$categoryClassInstance = new Category();
foreach ($category as $categoryInstance) {
Validate::isInstanceOf(
$categoryInstance,
$categoryClassInstance,
'category'
);
}
$this->category = $category;
} | php | public function setCategory(array $category)
{
$categoryClassInstance = new Category();
foreach ($category as $categoryInstance) {
Validate::isInstanceOf(
$categoryInstance,
$categoryClassInstance,
'category'
);
}
$this->category = $category;
} | [
"public",
"function",
"setCategory",
"(",
"array",
"$",
"category",
")",
"{",
"$",
"categoryClassInstance",
"=",
"new",
"Category",
"(",
")",
";",
"foreach",
"(",
"$",
"category",
"as",
"$",
"categoryInstance",
")",
"{",
"Validate",
"::",
"isInstanceOf",
"("... | Sets the category of the feed.
@param array $category The category of the feed | [
"Sets",
"the",
"category",
"of",
"the",
"feed",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/Common/Internal/Atom/Feed.php#L282-L293 | train |
Azure/azure-sdk-for-php | src/Common/Internal/Atom/Feed.php | Feed.setContributor | public function setContributor(array $contributor)
{
$person = new Person();
foreach ($contributor as $contributorInstance) {
Validate::isInstanceOf($contributorInstance, $person, 'contributor');
}
$this->contributor = $contributor;
} | php | public function setContributor(array $contributor)
{
$person = new Person();
foreach ($contributor as $contributorInstance) {
Validate::isInstanceOf($contributorInstance, $person, 'contributor');
}
$this->contributor = $contributor;
} | [
"public",
"function",
"setContributor",
"(",
"array",
"$",
"contributor",
")",
"{",
"$",
"person",
"=",
"new",
"Person",
"(",
")",
";",
"foreach",
"(",
"$",
"contributor",
"as",
"$",
"contributorInstance",
")",
"{",
"Validate",
"::",
"isInstanceOf",
"(",
"... | Sets contributor.
@param array $contributor The contributor of the feed | [
"Sets",
"contributor",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/Common/Internal/Atom/Feed.php#L310-L317 | train |
Azure/azure-sdk-for-php | examples/Client/CloudTable.php | CloudTable.insertTypelessEntity | public function insertTypelessEntity(array $entries, $options = null)
{
$entity = new Entity();
$entity->setPartitionKey($this->_defaultParitionKey);
$entity->setRowKey(uniqid());
foreach ($entries as $columnName => $value) {
$entity->addProperty($columnName, null, $value);
}
$this->_proxy->insertEntity($this->_name, $entity, $options);
} | php | public function insertTypelessEntity(array $entries, $options = null)
{
$entity = new Entity();
$entity->setPartitionKey($this->_defaultParitionKey);
$entity->setRowKey(uniqid());
foreach ($entries as $columnName => $value) {
$entity->addProperty($columnName, null, $value);
}
$this->_proxy->insertEntity($this->_name, $entity, $options);
} | [
"public",
"function",
"insertTypelessEntity",
"(",
"array",
"$",
"entries",
",",
"$",
"options",
"=",
"null",
")",
"{",
"$",
"entity",
"=",
"new",
"Entity",
"(",
")",
";",
"$",
"entity",
"->",
"setPartitionKey",
"(",
"$",
"this",
"->",
"_defaultParitionKey... | Inserts new entity to the table.
@param array $entries The entries values.
@param TableServiceOptions $options The optional parameters.
@see http://msdn.microsoft.com/en-us/library/windowsazure/dd179433.aspx | [
"Inserts",
"new",
"entity",
"to",
"the",
"table",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/examples/Client/CloudTable.php#L123-L134 | train |
Azure/azure-sdk-for-php | examples/Client/CloudTable.php | CloudTable.deleteEntity | public function deleteEntity($paritionKey, $rowKey)
{
$this->_proxy->deleteEntity(
$this->_name,
$paritionKey,
$rowKey
);
} | php | public function deleteEntity($paritionKey, $rowKey)
{
$this->_proxy->deleteEntity(
$this->_name,
$paritionKey,
$rowKey
);
} | [
"public",
"function",
"deleteEntity",
"(",
"$",
"paritionKey",
",",
"$",
"rowKey",
")",
"{",
"$",
"this",
"->",
"_proxy",
"->",
"deleteEntity",
"(",
"$",
"this",
"->",
"_name",
",",
"$",
"paritionKey",
",",
"$",
"rowKey",
")",
";",
"}"
] | Deletes an entity using the default partition key and provided row key.
@param string $rowKey The entity row key. | [
"Deletes",
"an",
"entity",
"using",
"the",
"default",
"partition",
"key",
"and",
"provided",
"row",
"key",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/examples/Client/CloudTable.php#L141-L148 | train |
Azure/azure-sdk-for-php | src/Common/Internal/ServiceManagementSettings.php | ServiceManagementSettings.createFromConnectionString | public static function createFromConnectionString($connectionString)
{
$tokenizedSettings = self::parseAndValidateKeys($connectionString);
$matchedSpecs = self::matchedSpecification(
$tokenizedSettings,
self::allRequired(
self::$_subscriptionIdSetting,
self::$_certificatePathSetting
),
self::optional(
self::$_endpointSetting
)
);
if ($matchedSpecs) {
$endpointUri = Utilities::tryGetValueInsensitive(
Resources::SERVICE_MANAGEMENT_ENDPOINT_NAME,
$tokenizedSettings,
Resources::SERVICE_MANAGEMENT_URL
);
$subscriptionId = Utilities::tryGetValueInsensitive(
Resources::SUBSCRIPTION_ID_NAME,
$tokenizedSettings
);
$certificatePath = Utilities::tryGetValueInsensitive(
Resources::CERTIFICATE_PATH_NAME,
$tokenizedSettings
);
return new self(
$subscriptionId,
$endpointUri,
$certificatePath
);
}
self::noMatch($connectionString);
return null;
} | php | public static function createFromConnectionString($connectionString)
{
$tokenizedSettings = self::parseAndValidateKeys($connectionString);
$matchedSpecs = self::matchedSpecification(
$tokenizedSettings,
self::allRequired(
self::$_subscriptionIdSetting,
self::$_certificatePathSetting
),
self::optional(
self::$_endpointSetting
)
);
if ($matchedSpecs) {
$endpointUri = Utilities::tryGetValueInsensitive(
Resources::SERVICE_MANAGEMENT_ENDPOINT_NAME,
$tokenizedSettings,
Resources::SERVICE_MANAGEMENT_URL
);
$subscriptionId = Utilities::tryGetValueInsensitive(
Resources::SUBSCRIPTION_ID_NAME,
$tokenizedSettings
);
$certificatePath = Utilities::tryGetValueInsensitive(
Resources::CERTIFICATE_PATH_NAME,
$tokenizedSettings
);
return new self(
$subscriptionId,
$endpointUri,
$certificatePath
);
}
self::noMatch($connectionString);
return null;
} | [
"public",
"static",
"function",
"createFromConnectionString",
"(",
"$",
"connectionString",
")",
"{",
"$",
"tokenizedSettings",
"=",
"self",
"::",
"parseAndValidateKeys",
"(",
"$",
"connectionString",
")",
";",
"$",
"matchedSpecs",
"=",
"self",
"::",
"matchedSpecifi... | Creates a ServiceManagementSettings object from the given connection string.
@param string $connectionString The storage settings connection string
@return ServiceManagementSettings|void | [
"Creates",
"a",
"ServiceManagementSettings",
"object",
"from",
"the",
"given",
"connection",
"string",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/Common/Internal/ServiceManagementSettings.php#L137-L175 | train |
Azure/azure-sdk-for-php | src/ServiceRuntime/Internal/RuntimeVersionManager.php | RuntimeVersionManager.getRuntimeClient | public function getRuntimeClient($versionEndpoint)
{
$versionMap = $this->_protocolClient->getVersionMap($versionEndpoint);
foreach ($this->_supportedVersionList as $factory) {
if (array_key_exists($factory->getVersion(), $versionMap)) {
return $factory->createRuntimeClient(
$versionMap[$factory->getVersion()]
);
}
}
throw new \RuntimeException(Resources::INVALID_VERSION_MSG);
} | php | public function getRuntimeClient($versionEndpoint)
{
$versionMap = $this->_protocolClient->getVersionMap($versionEndpoint);
foreach ($this->_supportedVersionList as $factory) {
if (array_key_exists($factory->getVersion(), $versionMap)) {
return $factory->createRuntimeClient(
$versionMap[$factory->getVersion()]
);
}
}
throw new \RuntimeException(Resources::INVALID_VERSION_MSG);
} | [
"public",
"function",
"getRuntimeClient",
"(",
"$",
"versionEndpoint",
")",
"{",
"$",
"versionMap",
"=",
"$",
"this",
"->",
"_protocolClient",
"->",
"getVersionMap",
"(",
"$",
"versionEndpoint",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"_supportedVersionList... | Gets the runtime client.
@param string $versionEndpoint The endpoint's version
@return Protocol1RuntimeClient | [
"Gets",
"the",
"runtime",
"client",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/ServiceRuntime/Internal/RuntimeVersionManager.php#L83-L96 | train |
Azure/azure-sdk-for-php | src/MediaServices/Models/IngestManifestStatistics.php | IngestManifestStatistics.fromArray | public function fromArray(array $options)
{
if (isset($options['PendingFilesCount'])) {
Validate::isInteger(
$options['PendingFilesCount'],
'options[PendingFilesCount]'
);
$this->_pendingFilesCount = $options['PendingFilesCount'];
}
if (isset($options['FinishedFilesCount'])) {
Validate::isInteger(
$options['FinishedFilesCount'],
'options[FinishedFilesCount]'
);
$this->_finishedFilesCount = $options['FinishedFilesCount'];
}
if (isset($options['ErrorFilesCount'])) {
Validate::isInteger(
$options['ErrorFilesCount'],
'options[ErrorFilesCount]'
);
$this->_errorFilesCount = $options['ErrorFilesCount'];
}
if (isset($options['ErrorFilesDetails'])) {
Validate::isString(
$options['ErrorFilesDetails'],
'options[ErrorFilesDetails]'
);
$this->_errorFilesDetails = $options['ErrorFilesDetails'];
}
} | php | public function fromArray(array $options)
{
if (isset($options['PendingFilesCount'])) {
Validate::isInteger(
$options['PendingFilesCount'],
'options[PendingFilesCount]'
);
$this->_pendingFilesCount = $options['PendingFilesCount'];
}
if (isset($options['FinishedFilesCount'])) {
Validate::isInteger(
$options['FinishedFilesCount'],
'options[FinishedFilesCount]'
);
$this->_finishedFilesCount = $options['FinishedFilesCount'];
}
if (isset($options['ErrorFilesCount'])) {
Validate::isInteger(
$options['ErrorFilesCount'],
'options[ErrorFilesCount]'
);
$this->_errorFilesCount = $options['ErrorFilesCount'];
}
if (isset($options['ErrorFilesDetails'])) {
Validate::isString(
$options['ErrorFilesDetails'],
'options[ErrorFilesDetails]'
);
$this->_errorFilesDetails = $options['ErrorFilesDetails'];
}
} | [
"public",
"function",
"fromArray",
"(",
"array",
"$",
"options",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"options",
"[",
"'PendingFilesCount'",
"]",
")",
")",
"{",
"Validate",
"::",
"isInteger",
"(",
"$",
"options",
"[",
"'PendingFilesCount'",
"]",
",",
... | Fill ManifestStatistics from array.
@param array $options Array containing values for object properties | [
"Fill",
"ManifestStatistics",
"from",
"array",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/Models/IngestManifestStatistics.php#L93-L126 | train |
Azure/azure-sdk-for-php | src/Common/Internal/Atom/Source.php | Source.parseXml | public function parseXml($xmlString)
{
$sourceXml = new \SimpleXMLElement($xmlString);
$sourceArray = (array) $sourceXml;
if (array_key_exists(Resources::AUTHOR, $sourceArray)) {
$this->author = $this->processAuthorNode($sourceArray);
}
if (array_key_exists(Resources::CATEGORY, $sourceArray)) {
$this->category = $this->processCategoryNode($sourceArray);
}
if (array_key_exists(Resources::CONTRIBUTOR, $sourceArray)) {
$this->contributor = $this->processContributorNode($sourceArray);
}
if (array_key_exists('generator', $sourceArray)) {
$generator = new Generator();
$generator->setText((string) $sourceArray['generator']->asXML());
$this->generator = $generator;
}
if (array_key_exists('icon', $sourceArray)) {
$this->icon = (string) $sourceArray['icon'];
}
if (array_key_exists('id', $sourceArray)) {
$this->id = (string) $sourceArray['id'];
}
if (array_key_exists(Resources::LINK, $sourceArray)) {
$this->link = $this->processLinkNode($sourceArray);
}
if (array_key_exists('logo', $sourceArray)) {
$this->logo = (string) $sourceArray['logo'];
}
if (array_key_exists('rights', $sourceArray)) {
$this->rights = (string) $sourceArray['rights'];
}
if (array_key_exists('subtitle', $sourceArray)) {
$this->subtitle = (string) $sourceArray['subtitle'];
}
if (array_key_exists('title', $sourceArray)) {
$this->title = (string) $sourceArray['title'];
}
if (array_key_exists('updated', $sourceArray)) {
$this->updated = \DateTime::createFromFormat(
\DateTime::ATOM,
(string) $sourceArray['updated']
);
}
} | php | public function parseXml($xmlString)
{
$sourceXml = new \SimpleXMLElement($xmlString);
$sourceArray = (array) $sourceXml;
if (array_key_exists(Resources::AUTHOR, $sourceArray)) {
$this->author = $this->processAuthorNode($sourceArray);
}
if (array_key_exists(Resources::CATEGORY, $sourceArray)) {
$this->category = $this->processCategoryNode($sourceArray);
}
if (array_key_exists(Resources::CONTRIBUTOR, $sourceArray)) {
$this->contributor = $this->processContributorNode($sourceArray);
}
if (array_key_exists('generator', $sourceArray)) {
$generator = new Generator();
$generator->setText((string) $sourceArray['generator']->asXML());
$this->generator = $generator;
}
if (array_key_exists('icon', $sourceArray)) {
$this->icon = (string) $sourceArray['icon'];
}
if (array_key_exists('id', $sourceArray)) {
$this->id = (string) $sourceArray['id'];
}
if (array_key_exists(Resources::LINK, $sourceArray)) {
$this->link = $this->processLinkNode($sourceArray);
}
if (array_key_exists('logo', $sourceArray)) {
$this->logo = (string) $sourceArray['logo'];
}
if (array_key_exists('rights', $sourceArray)) {
$this->rights = (string) $sourceArray['rights'];
}
if (array_key_exists('subtitle', $sourceArray)) {
$this->subtitle = (string) $sourceArray['subtitle'];
}
if (array_key_exists('title', $sourceArray)) {
$this->title = (string) $sourceArray['title'];
}
if (array_key_exists('updated', $sourceArray)) {
$this->updated = \DateTime::createFromFormat(
\DateTime::ATOM,
(string) $sourceArray['updated']
);
}
} | [
"public",
"function",
"parseXml",
"(",
"$",
"xmlString",
")",
"{",
"$",
"sourceXml",
"=",
"new",
"\\",
"SimpleXMLElement",
"(",
"$",
"xmlString",
")",
";",
"$",
"sourceArray",
"=",
"(",
"array",
")",
"$",
"sourceXml",
";",
"if",
"(",
"array_key_exists",
... | Creates a source object with specified XML string.
@param string $xmlString The XML string representing a source | [
"Creates",
"a",
"source",
"object",
"with",
"specified",
"XML",
"string",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/Common/Internal/Atom/Source.php#L155-L212 | train |
Azure/azure-sdk-for-php | src/Common/Internal/Atom/Source.php | Source.writeInnerXml | public function writeInnerXml(\XMLWriter $xmlWriter)
{
Validate::notNull($xmlWriter, 'xmlWriter');
if (!is_null($this->attributes)) {
if (is_array($this->attributes)) {
foreach ($this->attributes as $attributeName => $attributeValue) {
$xmlWriter->writeAttribute($attributeName, $attributeValue);
}
}
}
if (!is_null($this->author)) {
Validate::isArray($this->author, Resources::AUTHOR);
$this->writeArrayItem($xmlWriter, $this->author, Resources::AUTHOR);
}
if (!is_null($this->category)) {
Validate::isArray($this->category, Resources::CATEGORY);
$this->writeArrayItem(
$xmlWriter,
$this->category,
Resources::CATEGORY
);
}
if (!is_null($this->contributor)) {
Validate::isArray($this->contributor, Resources::CONTRIBUTOR);
$this->writeArrayItem(
$xmlWriter,
$this->contributor,
Resources::CONTRIBUTOR
);
}
if (!is_null($this->generator)) {
$this->generator->writeXml($xmlWriter);
}
if (!is_null($this->icon)) {
$xmlWriter->writeElementNS(
'atom',
'icon',
Resources::ATOM_NAMESPACE,
$this->icon
);
}
$this->writeOptionalElementNS(
$xmlWriter,
'atom',
'logo',
Resources::ATOM_NAMESPACE,
$this->logo
);
$this->writeOptionalElementNS(
$xmlWriter,
'atom',
'id',
Resources::ATOM_NAMESPACE,
$this->id
);
if (!is_null($this->link)) {
Validate::isArray($this->link, Resources::LINK);
$this->writeArrayItem(
$xmlWriter,
$this->link,
Resources::LINK
);
}
$this->writeOptionalElementNS(
$xmlWriter,
'atom',
'rights',
Resources::ATOM_NAMESPACE,
$this->rights
);
$this->writeOptionalElementNS(
$xmlWriter,
'atom',
'subtitle',
Resources::ATOM_NAMESPACE,
$this->subtitle
);
$this->writeOptionalElementNS(
$xmlWriter,
'atom',
'title',
Resources::ATOM_NAMESPACE,
$this->title
);
if (!is_null($this->updated)) {
$xmlWriter->writeElementNS(
'atom',
'updated',
Resources::ATOM_NAMESPACE,
$this->updated->format(\DateTime::ATOM)
);
}
} | php | public function writeInnerXml(\XMLWriter $xmlWriter)
{
Validate::notNull($xmlWriter, 'xmlWriter');
if (!is_null($this->attributes)) {
if (is_array($this->attributes)) {
foreach ($this->attributes as $attributeName => $attributeValue) {
$xmlWriter->writeAttribute($attributeName, $attributeValue);
}
}
}
if (!is_null($this->author)) {
Validate::isArray($this->author, Resources::AUTHOR);
$this->writeArrayItem($xmlWriter, $this->author, Resources::AUTHOR);
}
if (!is_null($this->category)) {
Validate::isArray($this->category, Resources::CATEGORY);
$this->writeArrayItem(
$xmlWriter,
$this->category,
Resources::CATEGORY
);
}
if (!is_null($this->contributor)) {
Validate::isArray($this->contributor, Resources::CONTRIBUTOR);
$this->writeArrayItem(
$xmlWriter,
$this->contributor,
Resources::CONTRIBUTOR
);
}
if (!is_null($this->generator)) {
$this->generator->writeXml($xmlWriter);
}
if (!is_null($this->icon)) {
$xmlWriter->writeElementNS(
'atom',
'icon',
Resources::ATOM_NAMESPACE,
$this->icon
);
}
$this->writeOptionalElementNS(
$xmlWriter,
'atom',
'logo',
Resources::ATOM_NAMESPACE,
$this->logo
);
$this->writeOptionalElementNS(
$xmlWriter,
'atom',
'id',
Resources::ATOM_NAMESPACE,
$this->id
);
if (!is_null($this->link)) {
Validate::isArray($this->link, Resources::LINK);
$this->writeArrayItem(
$xmlWriter,
$this->link,
Resources::LINK
);
}
$this->writeOptionalElementNS(
$xmlWriter,
'atom',
'rights',
Resources::ATOM_NAMESPACE,
$this->rights
);
$this->writeOptionalElementNS(
$xmlWriter,
'atom',
'subtitle',
Resources::ATOM_NAMESPACE,
$this->subtitle
);
$this->writeOptionalElementNS(
$xmlWriter,
'atom',
'title',
Resources::ATOM_NAMESPACE,
$this->title
);
if (!is_null($this->updated)) {
$xmlWriter->writeElementNS(
'atom',
'updated',
Resources::ATOM_NAMESPACE,
$this->updated->format(\DateTime::ATOM)
);
}
} | [
"public",
"function",
"writeInnerXml",
"(",
"\\",
"XMLWriter",
"$",
"xmlWriter",
")",
"{",
"Validate",
"::",
"notNull",
"(",
"$",
"xmlWriter",
",",
"'xmlWriter'",
")",
";",
"if",
"(",
"!",
"is_null",
"(",
"$",
"this",
"->",
"attributes",
")",
")",
"{",
... | Writes a inner XML representing the source object.
@param \XMLWriter $xmlWriter The XML writer | [
"Writes",
"a",
"inner",
"XML",
"representing",
"the",
"source",
"object",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/Common/Internal/Atom/Source.php#L495-L599 | train |
Azure/azure-sdk-for-php | examples/Client/CloudStorageService.php | CloudStorageService.tableExists | public function tableExists($name)
{
$tables = $this->listTables();
foreach ($tables as $tableName) {
if ($tableName == $name) {
return true;
}
}
return false;
} | php | public function tableExists($name)
{
$tables = $this->listTables();
foreach ($tables as $tableName) {
if ($tableName == $name) {
return true;
}
}
return false;
} | [
"public",
"function",
"tableExists",
"(",
"$",
"name",
")",
"{",
"$",
"tables",
"=",
"$",
"this",
"->",
"listTables",
"(",
")",
";",
"foreach",
"(",
"$",
"tables",
"as",
"$",
"tableName",
")",
"{",
"if",
"(",
"$",
"tableName",
"==",
"$",
"name",
")... | Checks if a given table name exists or not.
@param string $name The table name.
@return bool | [
"Checks",
"if",
"a",
"given",
"table",
"name",
"exists",
"or",
"not",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/examples/Client/CloudStorageService.php#L109-L119 | train |
Azure/azure-sdk-for-php | examples/Client/CloudStorageService.php | CloudStorageService.listTables | public function listTables()
{
$nextTableName = null;
$tables = array();
do {
$options = new QueryTablesOptions();
$options->setNextTableName($nextTableName);
$result = $this->_tableProxy->queryTables();
$nextTableName = $result->getNextTableName();
$tables = array_merge($tables, $result->getTables());
} while (!is_null($nextTableName));
return $tables;
} | php | public function listTables()
{
$nextTableName = null;
$tables = array();
do {
$options = new QueryTablesOptions();
$options->setNextTableName($nextTableName);
$result = $this->_tableProxy->queryTables();
$nextTableName = $result->getNextTableName();
$tables = array_merge($tables, $result->getTables());
} while (!is_null($nextTableName));
return $tables;
} | [
"public",
"function",
"listTables",
"(",
")",
"{",
"$",
"nextTableName",
"=",
"null",
";",
"$",
"tables",
"=",
"array",
"(",
")",
";",
"do",
"{",
"$",
"options",
"=",
"new",
"QueryTablesOptions",
"(",
")",
";",
"$",
"options",
"->",
"setNextTableName",
... | Lists all tables in this storage service.
@return array | [
"Lists",
"all",
"tables",
"in",
"this",
"storage",
"service",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/examples/Client/CloudStorageService.php#L126-L140 | train |
Azure/azure-sdk-for-php | examples/Client/CloudStorageService.php | CloudStorageService.createTable | public function createTable($name)
{
$cloudTable = null;
try {
$this->_tableProxy->createTable($name);
$cloudTable = new CloudTable($name, $this->_tableProxy);
} catch (\Exception $e) {
if ($e->getCode() == WindowsAzureErrorCodes::TABLE_ALREADY_EXISTS) {
$cloudTable = new CloudTable($name, $this->_tableProxy);
}
}
return $cloudTable;
} | php | public function createTable($name)
{
$cloudTable = null;
try {
$this->_tableProxy->createTable($name);
$cloudTable = new CloudTable($name, $this->_tableProxy);
} catch (\Exception $e) {
if ($e->getCode() == WindowsAzureErrorCodes::TABLE_ALREADY_EXISTS) {
$cloudTable = new CloudTable($name, $this->_tableProxy);
}
}
return $cloudTable;
} | [
"public",
"function",
"createTable",
"(",
"$",
"name",
")",
"{",
"$",
"cloudTable",
"=",
"null",
";",
"try",
"{",
"$",
"this",
"->",
"_tableProxy",
"->",
"createTable",
"(",
"$",
"name",
")",
";",
"$",
"cloudTable",
"=",
"new",
"CloudTable",
"(",
"$",
... | Creates table if it does not exist.
@param string $name The table name.
@return CloudTable | [
"Creates",
"table",
"if",
"it",
"does",
"not",
"exist",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/examples/Client/CloudStorageService.php#L149-L163 | train |
Azure/azure-sdk-for-php | examples/Client/CloudStorageService.php | CloudStorageService.deleteTable | public function deleteTable($name)
{
try {
$this->_tableProxy->deleteTable($name);
return true;
} catch (\Exception $ex) {
return false;
}
} | php | public function deleteTable($name)
{
try {
$this->_tableProxy->deleteTable($name);
return true;
} catch (\Exception $ex) {
return false;
}
} | [
"public",
"function",
"deleteTable",
"(",
"$",
"name",
")",
"{",
"try",
"{",
"$",
"this",
"->",
"_tableProxy",
"->",
"deleteTable",
"(",
"$",
"name",
")",
";",
"return",
"true",
";",
"}",
"catch",
"(",
"\\",
"Exception",
"$",
"ex",
")",
"{",
"return"... | Deletes given table.
@param string $name The table name.
@return bool Indicates if the table was deleted or not. | [
"Deletes",
"given",
"table",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/examples/Client/CloudStorageService.php#L172-L181 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.wrapAtomEntry | protected function wrapAtomEntry($entity, array $links = null)
{
Validate::notNull($entity, 'entity');
$content = new Content();
$content->setType(Resources::XML_CONTENT_TYPE);
$content->setText(ContentPropertiesSerializer::serialize($entity));
$atomEntry = new Entry();
$atomEntry->setContent($content);
if ($links) {
$atomEntry->setLink($links);
}
$xmlWriter = new \XMLWriter();
$xmlWriter->openMemory();
$atomEntry->writeXml($xmlWriter);
return $xmlWriter->outputMemory();
} | php | protected function wrapAtomEntry($entity, array $links = null)
{
Validate::notNull($entity, 'entity');
$content = new Content();
$content->setType(Resources::XML_CONTENT_TYPE);
$content->setText(ContentPropertiesSerializer::serialize($entity));
$atomEntry = new Entry();
$atomEntry->setContent($content);
if ($links) {
$atomEntry->setLink($links);
}
$xmlWriter = new \XMLWriter();
$xmlWriter->openMemory();
$atomEntry->writeXml($xmlWriter);
return $xmlWriter->outputMemory();
} | [
"protected",
"function",
"wrapAtomEntry",
"(",
"$",
"entity",
",",
"array",
"$",
"links",
"=",
"null",
")",
"{",
"Validate",
"::",
"notNull",
"(",
"$",
"entity",
",",
"'entity'",
")",
";",
"$",
"content",
"=",
"new",
"Content",
"(",
")",
";",
"$",
"c... | Wraps media services entity with Atom entry.
@param object $entity Media services entity
@param array $links AtomLinks to other media services entities
@return string XML string representing Atom Entry | [
"Wraps",
"media",
"services",
"entity",
"with",
"Atom",
"entry",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L167-L187 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getPropertiesFromAtomEntry | protected function getPropertiesFromAtomEntry(Entry $entry)
{
$result = [];
$content = $entry->getContent();
if (!empty($content)) {
$result = ContentPropertiesSerializer::unserialize(
$content->getXml()->children(Resources::DSM_XML_NAMESPACE)
);
}
return $result;
} | php | protected function getPropertiesFromAtomEntry(Entry $entry)
{
$result = [];
$content = $entry->getContent();
if (!empty($content)) {
$result = ContentPropertiesSerializer::unserialize(
$content->getXml()->children(Resources::DSM_XML_NAMESPACE)
);
}
return $result;
} | [
"protected",
"function",
"getPropertiesFromAtomEntry",
"(",
"Entry",
"$",
"entry",
")",
"{",
"$",
"result",
"=",
"[",
"]",
";",
"$",
"content",
"=",
"$",
"entry",
"->",
"getContent",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"content",
")",
"... | Extract media service entity from Atom Entry object.
@param Entry $entry Atom Entry containing properties of media services object
@return array of properties name => value | [
"Extract",
"media",
"service",
"entity",
"from",
"Atom",
"Entry",
"object",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L196-L207 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getEntryList | protected function getEntryList($xmlString)
{
$xml = simplexml_load_string($xmlString);
if ($xml->getName() == Resources::ENTRY) {
$entry = new Entry();
$entry->fromXml($xml);
$entries = [$entry];
} else {
$feed = new Feed();
$feed->parseXml($xmlString);
$entries = $feed->getEntry();
}
$result = [];
if (is_array($entries)) {
foreach ($entries as $entry) {
$properties = $this->getPropertiesFromAtomEntry($entry);
if (!empty($properties)) {
$result[] = $properties;
}
}
}
return $result;
} | php | protected function getEntryList($xmlString)
{
$xml = simplexml_load_string($xmlString);
if ($xml->getName() == Resources::ENTRY) {
$entry = new Entry();
$entry->fromXml($xml);
$entries = [$entry];
} else {
$feed = new Feed();
$feed->parseXml($xmlString);
$entries = $feed->getEntry();
}
$result = [];
if (is_array($entries)) {
foreach ($entries as $entry) {
$properties = $this->getPropertiesFromAtomEntry($entry);
if (!empty($properties)) {
$result[] = $properties;
}
}
}
return $result;
} | [
"protected",
"function",
"getEntryList",
"(",
"$",
"xmlString",
")",
"{",
"$",
"xml",
"=",
"simplexml_load_string",
"(",
"$",
"xmlString",
")",
";",
"if",
"(",
"$",
"xml",
"->",
"getName",
"(",
")",
"==",
"Resources",
"::",
"ENTRY",
")",
"{",
"$",
"ent... | Get array of properties of atom entities passed via feed or single entry.
@param string $xmlString Atom xml
@return array of properties arrays | [
"Get",
"array",
"of",
"properties",
"of",
"atom",
"entities",
"passed",
"via",
"feed",
"or",
"single",
"entry",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L216-L241 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy._createEntity | private function _createEntity($entity, $path, array $links = null)
{
$method = Resources::HTTP_POST;
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_CREATED;
$body = $this->wrapAtomEntry($entity, $links);
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode,
$body
);
$entry = new Entry();
$entry->parseXml($response->getBody());
return $this->getPropertiesFromAtomEntry($entry);
} | php | private function _createEntity($entity, $path, array $links = null)
{
$method = Resources::HTTP_POST;
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_CREATED;
$body = $this->wrapAtomEntry($entity, $links);
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode,
$body
);
$entry = new Entry();
$entry->parseXml($response->getBody());
return $this->getPropertiesFromAtomEntry($entry);
} | [
"private",
"function",
"_createEntity",
"(",
"$",
"entity",
",",
"$",
"path",
",",
"array",
"$",
"links",
"=",
"null",
")",
"{",
"$",
"method",
"=",
"Resources",
"::",
"HTTP_POST",
";",
"$",
"headers",
"=",
"[",
"]",
";",
"$",
"postParams",
"=",
"[",... | Create entity.
@param object $entity Entity data
@param string $path REST path
@param array $links AtomLinks to other media services entities
@return array Created entity data | [
"Create",
"entity",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L252-L275 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy._getEntity | private function _getEntity($path)
{
$method = Resources::HTTP_GET;
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_OK;
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
$entry = new Entry();
$entry->parseXml($response->getBody());
return $this->getPropertiesFromAtomEntry($entry);
} | php | private function _getEntity($path)
{
$method = Resources::HTTP_GET;
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_OK;
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
$entry = new Entry();
$entry->parseXml($response->getBody());
return $this->getPropertiesFromAtomEntry($entry);
} | [
"private",
"function",
"_getEntity",
"(",
"$",
"path",
")",
"{",
"$",
"method",
"=",
"Resources",
"::",
"HTTP_GET",
";",
"$",
"headers",
"=",
"[",
"]",
";",
"$",
"postParams",
"=",
"[",
"]",
";",
"$",
"queryParams",
"=",
"[",
"]",
";",
"$",
"status... | Get entity from Azure.
@param string $path REST path
@return Entity[] | [
"Get",
"entity",
"from",
"Azure",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L354-L375 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy._getEntityList | private function _getEntityList($path, array $queryParams = [])
{
$method = Resources::HTTP_GET;
$headers = [];
$postParams = [];
$statusCode = Resources::STATUS_OK;
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
return $this->getEntryList($response->getBody());
} | php | private function _getEntityList($path, array $queryParams = [])
{
$method = Resources::HTTP_GET;
$headers = [];
$postParams = [];
$statusCode = Resources::STATUS_OK;
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
return $this->getEntryList($response->getBody());
} | [
"private",
"function",
"_getEntityList",
"(",
"$",
"path",
",",
"array",
"$",
"queryParams",
"=",
"[",
"]",
")",
"{",
"$",
"method",
"=",
"Resources",
"::",
"HTTP_GET",
";",
"$",
"headers",
"=",
"[",
"]",
";",
"$",
"postParams",
"=",
"[",
"]",
";",
... | Get entity list.
@param string $path REST path
@param array $queryParams URL query parameters. An example is $queryParams = ['$top' => 20, '$skip' => 40] to
support paging
@return Entity[] | [
"Get",
"entity",
"list",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L386-L403 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy._updateEntity | private function _updateEntity($entity, $path)
{
$method = Resources::HTTP_MERGE;
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_NO_CONTENT;
$body = $this->wrapAtomEntry($entity);
$this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode,
$body
);
} | php | private function _updateEntity($entity, $path)
{
$method = Resources::HTTP_MERGE;
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_NO_CONTENT;
$body = $this->wrapAtomEntry($entity);
$this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode,
$body
);
} | [
"private",
"function",
"_updateEntity",
"(",
"$",
"entity",
",",
"$",
"path",
")",
"{",
"$",
"method",
"=",
"Resources",
"::",
"HTTP_MERGE",
";",
"$",
"headers",
"=",
"[",
"]",
";",
"$",
"postParams",
"=",
"[",
"]",
";",
"$",
"queryParams",
"=",
"[",... | Update entity.
@param object $entity Entity data
@param string $path REST path | [
"Update",
"entity",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L411-L429 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getAsset | public function getAsset($asset)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
return Asset::createFromOptions($this->_getEntity("Assets('{$assetId}')"));
} | php | public function getAsset($asset)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
return Asset::createFromOptions($this->_getEntity("Assets('{$assetId}')"));
} | [
"public",
"function",
"getAsset",
"(",
"$",
"asset",
")",
"{",
"$",
"assetId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"asset",
",",
"'WindowsAzure\\MediaServices\\Models\\Asset'",
")",
";",
"return",
"Asset",
"::",
"createFromOptions",
"(",
"$",
"this"... | Get asset.
@param Asset|string $asset Asset data or asset Id
@return Asset | [
"Get",
"asset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L473-L481 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getAssetList | public function getAssetList(array $queryParams = [])
{
$propertyList = $this->_getEntityList('Assets', $queryParams);
$result = [];
foreach ($propertyList as $properties) {
$result[] = Asset::createFromOptions($properties);
}
return $result;
} | php | public function getAssetList(array $queryParams = [])
{
$propertyList = $this->_getEntityList('Assets', $queryParams);
$result = [];
foreach ($propertyList as $properties) {
$result[] = Asset::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getAssetList",
"(",
"array",
"$",
"queryParams",
"=",
"[",
"]",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'Assets'",
",",
"$",
"queryParams",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"fore... | Get asset list.
@param array $queryParams. An example is $queryParams = ['$top' => 20, '$skip' => 40] to support paging
@return Asset[] | [
"Get",
"asset",
"list",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L490-L500 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getAssetContentKeys | public function getAssetContentKeys($asset)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$propertyList = $this->_getEntityList("Assets('{$assetId}')/ContentKeys");
$result = [];
foreach ($propertyList as $properties) {
$result[] = ContentKey::createFromOptions($properties);
}
return $result;
} | php | public function getAssetContentKeys($asset)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$propertyList = $this->_getEntityList("Assets('{$assetId}')/ContentKeys");
$result = [];
foreach ($propertyList as $properties) {
$result[] = ContentKey::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getAssetContentKeys",
"(",
"$",
"asset",
")",
"{",
"$",
"assetId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"asset",
",",
"'WindowsAzure\\MediaServices\\Models\\Asset'",
")",
";",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getE... | Get asset ContentKeys.
@param Asset|string $asset Asset data or asset Id
@return ContentKey[] | [
"Get",
"asset",
"ContentKeys",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L533-L548 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getAssetParentAssets | public function getAssetParentAssets($asset)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$propertyList = $this->_getEntityList("Assets('{$assetId}')/ParentAssets");
$result = [];
foreach ($propertyList as $properties) {
$result[] = Asset::createFromOptions($properties);
}
return $result;
} | php | public function getAssetParentAssets($asset)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$propertyList = $this->_getEntityList("Assets('{$assetId}')/ParentAssets");
$result = [];
foreach ($propertyList as $properties) {
$result[] = Asset::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getAssetParentAssets",
"(",
"$",
"asset",
")",
"{",
"$",
"assetId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"asset",
",",
"'WindowsAzure\\MediaServices\\Models\\Asset'",
")",
";",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_get... | Get parent assets of asset.
@param Asset|string $asset Asset data or asset Id
@return Asset[] | [
"Get",
"parent",
"assets",
"of",
"asset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L557-L572 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getAssetAssetFileList | public function getAssetAssetFileList($asset)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$propertyList = $this->_getEntityList("Assets('{$assetId}')/Files");
$result = [];
foreach ($propertyList as $properties) {
$result[] = AssetFile::createFromOptions($properties);
}
return $result;
} | php | public function getAssetAssetFileList($asset)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$propertyList = $this->_getEntityList("Assets('{$assetId}')/Files");
$result = [];
foreach ($propertyList as $properties) {
$result[] = AssetFile::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getAssetAssetFileList",
"(",
"$",
"asset",
")",
"{",
"$",
"assetId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"asset",
",",
"'WindowsAzure\\MediaServices\\Models\\Asset'",
")",
";",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_ge... | Get assetFiles of asset.
@param Asset|string $asset Asset data or asset Id
@return AssetFile[] | [
"Get",
"assetFiles",
"of",
"asset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L581-L596 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getAssetStorageAccount | public function getAssetStorageAccount($asset)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
return StorageAccount::createFromOptions(
$this->_getEntity("Assets('{$assetId}')/StorageAccount")
);
} | php | public function getAssetStorageAccount($asset)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
return StorageAccount::createFromOptions(
$this->_getEntity("Assets('{$assetId}')/StorageAccount")
);
} | [
"public",
"function",
"getAssetStorageAccount",
"(",
"$",
"asset",
")",
"{",
"$",
"assetId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"asset",
",",
"'WindowsAzure\\MediaServices\\Models\\Asset'",
")",
";",
"return",
"StorageAccount",
"::",
"createFromOptions",... | Get storage account of asset.
@param Asset|string $asset Asset data or asset Id
@return StorageAccount | [
"Get",
"storage",
"account",
"of",
"asset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L605-L615 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.linkContentKeyToAsset | public function linkContentKeyToAsset($asset, $contentKey)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$assetId = urlencode($assetId);
$contentKeyId = Utilities::getEntityId(
$contentKey,
'WindowsAzure\MediaServices\Models\ContentKey'
);
$contentKeyId = urlencode($contentKeyId);
$contentWriter = new \XMLWriter();
$contentWriter->openMemory();
$contentWriter->writeElementNS(
'data',
'uri',
Resources::DS_XML_NAMESPACE,
$this->getUri()."ContentKeys('{$contentKeyId}')"
);
$method = Resources::HTTP_POST;
$path = "Assets('{$assetId}')/\$links/ContentKeys";
$headers = [
Resources::CONTENT_TYPE => Resources::XML_CONTENT_TYPE,
];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_NO_CONTENT;
$body = $contentWriter->outputMemory();
$this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode,
$body
);
} | php | public function linkContentKeyToAsset($asset, $contentKey)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$assetId = urlencode($assetId);
$contentKeyId = Utilities::getEntityId(
$contentKey,
'WindowsAzure\MediaServices\Models\ContentKey'
);
$contentKeyId = urlencode($contentKeyId);
$contentWriter = new \XMLWriter();
$contentWriter->openMemory();
$contentWriter->writeElementNS(
'data',
'uri',
Resources::DS_XML_NAMESPACE,
$this->getUri()."ContentKeys('{$contentKeyId}')"
);
$method = Resources::HTTP_POST;
$path = "Assets('{$assetId}')/\$links/ContentKeys";
$headers = [
Resources::CONTENT_TYPE => Resources::XML_CONTENT_TYPE,
];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_NO_CONTENT;
$body = $contentWriter->outputMemory();
$this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode,
$body
);
} | [
"public",
"function",
"linkContentKeyToAsset",
"(",
"$",
"asset",
",",
"$",
"contentKey",
")",
"{",
"$",
"assetId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"asset",
",",
"'WindowsAzure\\MediaServices\\Models\\Asset'",
")",
";",
"$",
"assetId",
"=",
"url... | Link ContentKey to Asset.
@param Asset|string $asset Asset to link a ContentKey or Asset id
@param ContentKey|string $contentKey ContentKey to link or ContentKey id | [
"Link",
"ContentKey",
"to",
"Asset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L648-L691 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.removeContentKeyFromAsset | public function removeContentKeyFromAsset($asset, $contentKey)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$contentKeyId = Utilities::getEntityId(
$contentKey,
'WindowsAzure\MediaServices\Models\ContentKey'
);
$method = Resources::HTTP_DELETE;
$path = "Assets('{$assetId}')/\$links/ContentKeys('{$contentKeyId}')";
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_NO_CONTENT;
$this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
} | php | public function removeContentKeyFromAsset($asset, $contentKey)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$contentKeyId = Utilities::getEntityId(
$contentKey,
'WindowsAzure\MediaServices\Models\ContentKey'
);
$method = Resources::HTTP_DELETE;
$path = "Assets('{$assetId}')/\$links/ContentKeys('{$contentKeyId}')";
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_NO_CONTENT;
$this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
} | [
"public",
"function",
"removeContentKeyFromAsset",
"(",
"$",
"asset",
",",
"$",
"contentKey",
")",
"{",
"$",
"assetId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"asset",
",",
"'WindowsAzure\\MediaServices\\Models\\Asset'",
")",
";",
"$",
"contentKeyId",
"=... | Remove ContentKey from Asset.
@param Asset|string $asset Asset to remove a ContentKey or
Asset id
@param ContentKey|string $contentKey ContentKey to remove or
ContentKey id | [
"Remove",
"ContentKey",
"from",
"Asset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L701-L728 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getAccessPolicy | public function getAccessPolicy($accessPolicy)
{
$accessPolicyId = Utilities::getEntityId(
$accessPolicy,
'WindowsAzure\MediaServices\Models\AccessPolicy'
);
return AccessPolicy::createFromOptions(
$this->_getEntity("AccessPolicies('{$accessPolicyId}')")
);
} | php | public function getAccessPolicy($accessPolicy)
{
$accessPolicyId = Utilities::getEntityId(
$accessPolicy,
'WindowsAzure\MediaServices\Models\AccessPolicy'
);
return AccessPolicy::createFromOptions(
$this->_getEntity("AccessPolicies('{$accessPolicyId}')")
);
} | [
"public",
"function",
"getAccessPolicy",
"(",
"$",
"accessPolicy",
")",
"{",
"$",
"accessPolicyId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"accessPolicy",
",",
"'WindowsAzure\\MediaServices\\Models\\AccessPolicy'",
")",
";",
"return",
"AccessPolicy",
"::",
"... | Get AccessPolicy.
@param AccessPolicy|string $accessPolicy AccessPolicy data or AccessPolicy Id
@return AccessPolicy | [
"Get",
"AccessPolicy",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L751-L761 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getAccessPolicyList | public function getAccessPolicyList()
{
$propertyList = $this->_getEntityList('AccessPolicies');
$result = [];
foreach ($propertyList as $properties) {
$result[] = AccessPolicy::createFromOptions($properties);
}
return $result;
} | php | public function getAccessPolicyList()
{
$propertyList = $this->_getEntityList('AccessPolicies');
$result = [];
foreach ($propertyList as $properties) {
$result[] = AccessPolicy::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getAccessPolicyList",
"(",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'AccessPolicies'",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"propertyList",
"as",
"$",
"properties",
"... | Get list of AccessPolicies.
@return AccessPolicy[] | [
"Get",
"list",
"of",
"AccessPolicies",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L768-L778 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getLocator | public function getLocator($locator)
{
$locatorId = Utilities::getEntityId(
$locator,
'WindowsAzure\MediaServices\Models\Locator'
);
return Locator::createFromOptions(
$this->_getEntity("Locators('{$locatorId}')")
);
} | php | public function getLocator($locator)
{
$locatorId = Utilities::getEntityId(
$locator,
'WindowsAzure\MediaServices\Models\Locator'
);
return Locator::createFromOptions(
$this->_getEntity("Locators('{$locatorId}')")
);
} | [
"public",
"function",
"getLocator",
"(",
"$",
"locator",
")",
"{",
"$",
"locatorId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"locator",
",",
"'WindowsAzure\\MediaServices\\Models\\Locator'",
")",
";",
"return",
"Locator",
"::",
"createFromOptions",
"(",
"... | Get Locator.
@param Locator|string $locator Locator data or locator Id
@return Locator | [
"Get",
"Locator",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L816-L826 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getLocatorAccessPolicy | public function getLocatorAccessPolicy($locator)
{
$locatorId = Utilities::getEntityId(
$locator,
'WindowsAzure\MediaServices\Models\Locator'
);
return AccessPolicy::createFromOptions(
$this->_getEntity("Locators('{$locatorId}')/AccessPolicy")
);
} | php | public function getLocatorAccessPolicy($locator)
{
$locatorId = Utilities::getEntityId(
$locator,
'WindowsAzure\MediaServices\Models\Locator'
);
return AccessPolicy::createFromOptions(
$this->_getEntity("Locators('{$locatorId}')/AccessPolicy")
);
} | [
"public",
"function",
"getLocatorAccessPolicy",
"(",
"$",
"locator",
")",
"{",
"$",
"locatorId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"locator",
",",
"'WindowsAzure\\MediaServices\\Models\\Locator'",
")",
";",
"return",
"AccessPolicy",
"::",
"createFromOpt... | Get Locator access policy.
@param Locator|string $locator Locator data or locator Id
@return AccessPolicy | [
"Get",
"Locator",
"access",
"policy",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L835-L845 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getLocatorAsset | public function getLocatorAsset($locator)
{
$locatorId = Utilities::getEntityId(
$locator,
'WindowsAzure\MediaServices\Models\Locator'
);
return Asset::createFromOptions(
$this->_getEntity("Locators('{$locatorId}')/Asset")
);
} | php | public function getLocatorAsset($locator)
{
$locatorId = Utilities::getEntityId(
$locator,
'WindowsAzure\MediaServices\Models\Locator'
);
return Asset::createFromOptions(
$this->_getEntity("Locators('{$locatorId}')/Asset")
);
} | [
"public",
"function",
"getLocatorAsset",
"(",
"$",
"locator",
")",
"{",
"$",
"locatorId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"locator",
",",
"'WindowsAzure\\MediaServices\\Models\\Locator'",
")",
";",
"return",
"Asset",
"::",
"createFromOptions",
"(",
... | Get Locator asset.
@param Locator|string $locator Locator data or locator Id
@return Asset | [
"Get",
"Locator",
"asset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L854-L864 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getLocatorList | public function getLocatorList(array $queryParams = [])
{
$propertyList = $this->_getEntityList('Locators', $queryParams);
$result = [];
foreach ($propertyList as $properties) {
$result[] = Locator::createFromOptions($properties);
}
return $result;
} | php | public function getLocatorList(array $queryParams = [])
{
$propertyList = $this->_getEntityList('Locators', $queryParams);
$result = [];
foreach ($propertyList as $properties) {
$result[] = Locator::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getLocatorList",
"(",
"array",
"$",
"queryParams",
"=",
"[",
"]",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'Locators'",
",",
"$",
"queryParams",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"... | Get list of Locators.
@return Locator[] | [
"Get",
"list",
"of",
"Locators",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L896-L906 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.createFileInfos | public function createFileInfos($asset)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$assetIdEncoded = urlencode($assetId);
$method = Resources::HTTP_GET;
$headers = [];
$postParams = [];
$queryParams = [];
$path = "CreateFileInfos?assetid='{$assetIdEncoded}'";
$statusCode = Resources::STATUS_NO_CONTENT;
$this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
} | php | public function createFileInfos($asset)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$assetIdEncoded = urlencode($assetId);
$method = Resources::HTTP_GET;
$headers = [];
$postParams = [];
$queryParams = [];
$path = "CreateFileInfos?assetid='{$assetIdEncoded}'";
$statusCode = Resources::STATUS_NO_CONTENT;
$this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
} | [
"public",
"function",
"createFileInfos",
"(",
"$",
"asset",
")",
"{",
"$",
"assetId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"asset",
",",
"'WindowsAzure\\MediaServices\\Models\\Asset'",
")",
";",
"$",
"assetIdEncoded",
"=",
"urlencode",
"(",
"$",
"ass... | Generate file info for all files in asset.
@param Asset|string $asset Asset data or asset Id | [
"Generate",
"file",
"info",
"for",
"all",
"files",
"in",
"asset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L938-L961 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getAssetFile | public function getAssetFile($assetFile)
{
$assetFileId = Utilities::getEntityId(
$assetFile,
'WindowsAzure\MediaServices\Models\AssetFile'
);
return AssetFile::createFromOptions(
$this->_getEntity("Files('{$assetFileId}')")
);
} | php | public function getAssetFile($assetFile)
{
$assetFileId = Utilities::getEntityId(
$assetFile,
'WindowsAzure\MediaServices\Models\AssetFile'
);
return AssetFile::createFromOptions(
$this->_getEntity("Files('{$assetFileId}')")
);
} | [
"public",
"function",
"getAssetFile",
"(",
"$",
"assetFile",
")",
"{",
"$",
"assetFileId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"assetFile",
",",
"'WindowsAzure\\MediaServices\\Models\\AssetFile'",
")",
";",
"return",
"AssetFile",
"::",
"createFromOptions"... | Get asset file.
@param AssetFile|string $assetFile AssetFile data or assetFile Id
@return AssetFile | [
"Get",
"asset",
"file",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L970-L980 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getAssetFileList | public function getAssetFileList()
{
$propertyList = $this->_getEntityList('Files');
$result = [];
foreach ($propertyList as $properties) {
$result[] = AssetFile::createFromOptions($properties);
}
return $result;
} | php | public function getAssetFileList()
{
$propertyList = $this->_getEntityList('Files');
$result = [];
foreach ($propertyList as $properties) {
$result[] = AssetFile::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getAssetFileList",
"(",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'Files'",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"propertyList",
"as",
"$",
"properties",
")",
"{",
... | Get list of all asset files.
@return AssetFile[] | [
"Get",
"list",
"of",
"all",
"asset",
"files",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L987-L997 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.uploadAssetFile | public function uploadAssetFile(Locator $locator, $name, $file)
{
Validate::isString($name, 'name');
Validate::notNull($file, 'file');
$urlFile = $locator->getBaseUri().'/'.$name;
$url = $urlFile.$locator->getContentAccessComponent();
if (is_resource($file)) {
$this->_uploadAssetFileFromResource($url, $file);
} else {
$this->_uploadAssetFileFromString($url, $file);
}
} | php | public function uploadAssetFile(Locator $locator, $name, $file)
{
Validate::isString($name, 'name');
Validate::notNull($file, 'file');
$urlFile = $locator->getBaseUri().'/'.$name;
$url = $urlFile.$locator->getContentAccessComponent();
if (is_resource($file)) {
$this->_uploadAssetFileFromResource($url, $file);
} else {
$this->_uploadAssetFileFromString($url, $file);
}
} | [
"public",
"function",
"uploadAssetFile",
"(",
"Locator",
"$",
"locator",
",",
"$",
"name",
",",
"$",
"file",
")",
"{",
"Validate",
"::",
"isString",
"(",
"$",
"name",
",",
"'name'",
")",
";",
"Validate",
"::",
"notNull",
"(",
"$",
"file",
",",
"'file'"... | Upload asset file to storage.
@param Locator $locator Write locator for file upload
@param string $name Uploading filename
@param string | resource $file Uploading content or file handle | [
"Upload",
"asset",
"file",
"to",
"storage",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1016-L1029 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.downloadAssetFile | public function downloadAssetFile(AssetFile $assetFile, Locator $locator, $path)
{
Validate::isString($path, 'path');
Validate::pathExists($path);
$downloadUrl = $locator->getBaseUri().'/'.$assetFile->getName().$locator->getContentAccessComponent();
$filePath = $path.'/'.$assetFile->getName();
return file_put_contents($filePath, fopen($downloadUrl, 'r'));
} | php | public function downloadAssetFile(AssetFile $assetFile, Locator $locator, $path)
{
Validate::isString($path, 'path');
Validate::pathExists($path);
$downloadUrl = $locator->getBaseUri().'/'.$assetFile->getName().$locator->getContentAccessComponent();
$filePath = $path.'/'.$assetFile->getName();
return file_put_contents($filePath, fopen($downloadUrl, 'r'));
} | [
"public",
"function",
"downloadAssetFile",
"(",
"AssetFile",
"$",
"assetFile",
",",
"Locator",
"$",
"locator",
",",
"$",
"path",
")",
"{",
"Validate",
"::",
"isString",
"(",
"$",
"path",
",",
"'path'",
")",
";",
"Validate",
"::",
"pathExists",
"(",
"$",
... | Download asset file to a local path.
@param AssetFile $assetFile Asset file to download
@param Locator $locator Read locator for downloading the asset file
@param string $path Destination root path
@return int | [
"Download",
"asset",
"file",
"to",
"a",
"local",
"path",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1040-L1049 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy._getCreateTaskContext | private function _getCreateTaskContext(Task $task)
{
$result = new HttpCallContext();
$result->setMethod(Resources::HTTP_POST);
$result->setHeaders($this->_batchHeaders);
$result->setUri($this->getUri());
$result->setPath('/$1/Tasks');
$result->setBody($this->wrapAtomEntry($task));
$result->addStatusCode(Resources::STATUS_CREATED);
return $result;
} | php | private function _getCreateTaskContext(Task $task)
{
$result = new HttpCallContext();
$result->setMethod(Resources::HTTP_POST);
$result->setHeaders($this->_batchHeaders);
$result->setUri($this->getUri());
$result->setPath('/$1/Tasks');
$result->setBody($this->wrapAtomEntry($task));
$result->addStatusCode(Resources::STATUS_CREATED);
return $result;
} | [
"private",
"function",
"_getCreateTaskContext",
"(",
"Task",
"$",
"task",
")",
"{",
"$",
"result",
"=",
"new",
"HttpCallContext",
"(",
")",
";",
"$",
"result",
"->",
"setMethod",
"(",
"Resources",
"::",
"HTTP_POST",
")",
";",
"$",
"result",
"->",
"setHeade... | Create task HTTP call context.
@param Task $task Task object to be created
@return HttpCallContext | [
"Create",
"task",
"HTTP",
"call",
"context",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1289-L1300 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getJob | public function getJob($job)
{
$jobId = Utilities::getEntityId(
$job,
'WindowsAzure\MediaServices\Models\Job'
);
return Job::createFromOptions($this->_getEntity("Jobs('{$jobId}')"));
} | php | public function getJob($job)
{
$jobId = Utilities::getEntityId(
$job,
'WindowsAzure\MediaServices\Models\Job'
);
return Job::createFromOptions($this->_getEntity("Jobs('{$jobId}')"));
} | [
"public",
"function",
"getJob",
"(",
"$",
"job",
")",
"{",
"$",
"jobId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"job",
",",
"'WindowsAzure\\MediaServices\\Models\\Job'",
")",
";",
"return",
"Job",
"::",
"createFromOptions",
"(",
"$",
"this",
"->",
... | Get Job.
@param Job|string $job Job data or job Id
@return Job | [
"Get",
"Job",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1359-L1367 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getJobList | public function getJobList()
{
$propertyList = $this->_getEntityList('Jobs');
$result = [];
foreach ($propertyList as $properties) {
$result[] = Job::createFromOptions($properties);
}
return $result;
} | php | public function getJobList()
{
$propertyList = $this->_getEntityList('Jobs');
$result = [];
foreach ($propertyList as $properties) {
$result[] = Job::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getJobList",
"(",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'Jobs'",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"propertyList",
"as",
"$",
"properties",
")",
"{",
"$",
... | Get list of Jobs.
@return array of Models\Job | [
"Get",
"list",
"of",
"Jobs",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1374-L1384 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getJobStatus | public function getJobStatus($job)
{
$jobId = Utilities::getEntityId(
$job,
'WindowsAzure\MediaServices\Models\Job'
);
$jobIdEncoded = urlencode($jobId);
$method = Resources::HTTP_GET;
$headers = [];
$postParams = [];
$queryParams = [];
$path = "Jobs('{$jobIdEncoded}')/State";
$statusCode = Resources::STATUS_OK;
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
return strip_tags($response->getBody());
} | php | public function getJobStatus($job)
{
$jobId = Utilities::getEntityId(
$job,
'WindowsAzure\MediaServices\Models\Job'
);
$jobIdEncoded = urlencode($jobId);
$method = Resources::HTTP_GET;
$headers = [];
$postParams = [];
$queryParams = [];
$path = "Jobs('{$jobIdEncoded}')/State";
$statusCode = Resources::STATUS_OK;
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
return strip_tags($response->getBody());
} | [
"public",
"function",
"getJobStatus",
"(",
"$",
"job",
")",
"{",
"$",
"jobId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"job",
",",
"'WindowsAzure\\MediaServices\\Models\\Job'",
")",
";",
"$",
"jobIdEncoded",
"=",
"urlencode",
"(",
"$",
"jobId",
")",
... | Get status of a job.
@param Job|string $job Job data or job Id
@return string | [
"Get",
"status",
"of",
"a",
"job",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1393-L1418 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getJobTasks | public function getJobTasks($job)
{
$jobId = Utilities::getEntityId(
$job,
'WindowsAzure\MediaServices\Models\Job'
);
$propertyList = $this->_getEntityList("Jobs('{$jobId}')/Tasks");
$result = [];
foreach ($propertyList as $properties) {
$result[] = Task::createFromOptions($properties);
}
return $result;
} | php | public function getJobTasks($job)
{
$jobId = Utilities::getEntityId(
$job,
'WindowsAzure\MediaServices\Models\Job'
);
$propertyList = $this->_getEntityList("Jobs('{$jobId}')/Tasks");
$result = [];
foreach ($propertyList as $properties) {
$result[] = Task::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getJobTasks",
"(",
"$",
"job",
")",
"{",
"$",
"jobId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"job",
",",
"'WindowsAzure\\MediaServices\\Models\\Job'",
")",
";",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(... | Get job tasks.
@param Job|string $job Job data or job Id
@return Task[] | [
"Get",
"job",
"tasks",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1427-L1442 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getJobInputMediaAssets | public function getJobInputMediaAssets($job)
{
$jobId = Utilities::getEntityId(
$job,
'WindowsAzure\MediaServices\Models\Job'
);
$propertyList = $this->_getEntityList("Jobs('{$jobId}')/InputMediaAssets");
$result = [];
foreach ($propertyList as $properties) {
$result[] = Asset::createFromOptions($properties);
}
return $result;
} | php | public function getJobInputMediaAssets($job)
{
$jobId = Utilities::getEntityId(
$job,
'WindowsAzure\MediaServices\Models\Job'
);
$propertyList = $this->_getEntityList("Jobs('{$jobId}')/InputMediaAssets");
$result = [];
foreach ($propertyList as $properties) {
$result[] = Asset::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getJobInputMediaAssets",
"(",
"$",
"job",
")",
"{",
"$",
"jobId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"job",
",",
"'WindowsAzure\\MediaServices\\Models\\Job'",
")",
";",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntity... | Get job input assets.
@param Job|string $job Job data or job Id
@return Asset[] | [
"Get",
"job",
"input",
"assets",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1451-L1466 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.cancelJob | public function cancelJob($job)
{
$jobId = Utilities::getEntityId(
$job,
'WindowsAzure\MediaServices\Models\Job'
);
$jobIdEncoded = urlencode($jobId);
$method = Resources::HTTP_GET;
$headers = [];
$postParams = [];
$queryParams = [];
$path = "CancelJob?jobid='{$jobIdEncoded}'";
$statusCode = Resources::STATUS_NO_CONTENT;
$this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
} | php | public function cancelJob($job)
{
$jobId = Utilities::getEntityId(
$job,
'WindowsAzure\MediaServices\Models\Job'
);
$jobIdEncoded = urlencode($jobId);
$method = Resources::HTTP_GET;
$headers = [];
$postParams = [];
$queryParams = [];
$path = "CancelJob?jobid='{$jobIdEncoded}'";
$statusCode = Resources::STATUS_NO_CONTENT;
$this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
} | [
"public",
"function",
"cancelJob",
"(",
"$",
"job",
")",
"{",
"$",
"jobId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"job",
",",
"'WindowsAzure\\MediaServices\\Models\\Job'",
")",
";",
"$",
"jobIdEncoded",
"=",
"urlencode",
"(",
"$",
"jobId",
")",
";... | Cancel a job.
@param Job|string $job Job data or job Id | [
"Cancel",
"a",
"job",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1497-L1520 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getTaskList | public function getTaskList()
{
$propertyList = $this->_getEntityList('Tasks');
$result = [];
foreach ($propertyList as $properties) {
$result[] = Task::createFromOptions($properties);
}
return $result;
} | php | public function getTaskList()
{
$propertyList = $this->_getEntityList('Tasks');
$result = [];
foreach ($propertyList as $properties) {
$result[] = Task::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getTaskList",
"(",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'Tasks'",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"propertyList",
"as",
"$",
"properties",
")",
"{",
"$",... | Get list of tasks.
@return Task[] | [
"Get",
"list",
"of",
"tasks",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1542-L1552 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy._getCreateTaskTemplateContext | private function _getCreateTaskTemplateContext(TaskTemplate $taskTemplate)
{
$result = new HttpCallContext();
$result->setMethod(Resources::HTTP_POST);
$result->setHeaders($this->_batchHeaders);
$result->setUri($this->getUri());
$result->setPath('/$1/TaskTemplates');
$result->setBody($this->wrapAtomEntry($taskTemplate));
$result->addStatusCode(Resources::STATUS_CREATED);
return $result;
} | php | private function _getCreateTaskTemplateContext(TaskTemplate $taskTemplate)
{
$result = new HttpCallContext();
$result->setMethod(Resources::HTTP_POST);
$result->setHeaders($this->_batchHeaders);
$result->setUri($this->getUri());
$result->setPath('/$1/TaskTemplates');
$result->setBody($this->wrapAtomEntry($taskTemplate));
$result->addStatusCode(Resources::STATUS_CREATED);
return $result;
} | [
"private",
"function",
"_getCreateTaskTemplateContext",
"(",
"TaskTemplate",
"$",
"taskTemplate",
")",
"{",
"$",
"result",
"=",
"new",
"HttpCallContext",
"(",
")",
";",
"$",
"result",
"->",
"setMethod",
"(",
"Resources",
"::",
"HTTP_POST",
")",
";",
"$",
"resu... | Create task template HTTP call context.
@param TaskTemplate $taskTemplate Task template object to be created
@return HttpCallContext | [
"Create",
"task",
"template",
"HTTP",
"call",
"context",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1581-L1592 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getJobTemplate | public function getJobTemplate($jobTemplate)
{
$jobTemplateId = Utilities::getEntityId(
$jobTemplate,
'WindowsAzure\MediaServices\Models\JobTemplate'
);
return JobTemplate::createFromOptions(
$this->_getEntity("JobTemplates('{$jobTemplateId}')")
);
} | php | public function getJobTemplate($jobTemplate)
{
$jobTemplateId = Utilities::getEntityId(
$jobTemplate,
'WindowsAzure\MediaServices\Models\JobTemplate'
);
return JobTemplate::createFromOptions(
$this->_getEntity("JobTemplates('{$jobTemplateId}')")
);
} | [
"public",
"function",
"getJobTemplate",
"(",
"$",
"jobTemplate",
")",
"{",
"$",
"jobTemplateId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"jobTemplate",
",",
"'WindowsAzure\\MediaServices\\Models\\JobTemplate'",
")",
";",
"return",
"JobTemplate",
"::",
"create... | Get job template.
@param JobTemplate|string $jobTemplate Job template data or jobTemplate Id
@return JobTemplate | [
"Get",
"job",
"template",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1654-L1664 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getJobTemplateList | public function getJobTemplateList(array $queryParams = [])
{
$propertyList = $this->_getEntityList('JobTemplates', $queryParams);
$result = [];
foreach ($propertyList as $properties) {
$result[] = JobTemplate::createFromOptions($properties);
}
return $result;
} | php | public function getJobTemplateList(array $queryParams = [])
{
$propertyList = $this->_getEntityList('JobTemplates', $queryParams);
$result = [];
foreach ($propertyList as $properties) {
$result[] = JobTemplate::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getJobTemplateList",
"(",
"array",
"$",
"queryParams",
"=",
"[",
"]",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'JobTemplates'",
",",
"$",
"queryParams",
")",
";",
"$",
"result",
"=",
"[",
"]",
... | Get list of Job Templates.
@return JobTemplate[] | [
"Get",
"list",
"of",
"Job",
"Templates",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1671-L1681 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getJobTemplateTaskTemplateList | public function getJobTemplateTaskTemplateList($jobTemplate)
{
$jobTemplateId = Utilities::getEntityId(
$jobTemplate,
'WindowsAzure\MediaServices\Models\JobTemplate'
);
$propertyList = $this->_getEntityList(
"JobTemplates('{$jobTemplateId}')/TaskTemplates"
);
$result = [];
foreach ($propertyList as $properties) {
$result[] = TaskTemplate::createFromOptions($properties);
}
return $result;
} | php | public function getJobTemplateTaskTemplateList($jobTemplate)
{
$jobTemplateId = Utilities::getEntityId(
$jobTemplate,
'WindowsAzure\MediaServices\Models\JobTemplate'
);
$propertyList = $this->_getEntityList(
"JobTemplates('{$jobTemplateId}')/TaskTemplates"
);
$result = [];
foreach ($propertyList as $properties) {
$result[] = TaskTemplate::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getJobTemplateTaskTemplateList",
"(",
"$",
"jobTemplate",
")",
"{",
"$",
"jobTemplateId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"jobTemplate",
",",
"'WindowsAzure\\MediaServices\\Models\\JobTemplate'",
")",
";",
"$",
"propertyList",
"="... | Get task templates for job template.
@param JobTemplate|string $jobTemplate Job template data or jobTemplate Id
@return TaskTemplate[] | [
"Get",
"task",
"templates",
"for",
"job",
"template",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1690-L1707 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getTaskTemplateList | public function getTaskTemplateList(array $queryParams = [])
{
$propertyList = $this->_getEntityList('TaskTemplates', $queryParams);
$result = [];
foreach ($propertyList as $properties) {
$result[] = TaskTemplate::createFromOptions($properties);
}
return $result;
} | php | public function getTaskTemplateList(array $queryParams = [])
{
$propertyList = $this->_getEntityList('TaskTemplates', $queryParams);
$result = [];
foreach ($propertyList as $properties) {
$result[] = TaskTemplate::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getTaskTemplateList",
"(",
"array",
"$",
"queryParams",
"=",
"[",
"]",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'TaskTemplates'",
",",
"$",
"queryParams",
")",
";",
"$",
"result",
"=",
"[",
"]",
... | Get list of task templates.
@return TaskTemplate[] | [
"Get",
"list",
"of",
"task",
"templates",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1729-L1739 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getMediaProcessors | public function getMediaProcessors()
{
$propertyList = $this->_getEntityList('MediaProcessors');
$result = [];
foreach ($propertyList as $properties) {
$result[] = MediaProcessor::createFromOptions($properties);
}
return $result;
} | php | public function getMediaProcessors()
{
$propertyList = $this->_getEntityList('MediaProcessors');
$result = [];
foreach ($propertyList as $properties) {
$result[] = MediaProcessor::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getMediaProcessors",
"(",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'MediaProcessors'",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"propertyList",
"as",
"$",
"properties",
"... | Get list of all media processors asset files.
@return MediaProcessor[] | [
"Get",
"list",
"of",
"all",
"media",
"processors",
"asset",
"files",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1746-L1756 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getIngestManifest | public function getIngestManifest($ingestManifest)
{
$ingestManifestId = Utilities::getEntityId(
$ingestManifest,
'WindowsAzure\MediaServices\Models\IngestManifest'
);
return IngestManifest::createFromOptions(
$this->_getEntity("IngestManifests('{$ingestManifestId}')")
);
} | php | public function getIngestManifest($ingestManifest)
{
$ingestManifestId = Utilities::getEntityId(
$ingestManifest,
'WindowsAzure\MediaServices\Models\IngestManifest'
);
return IngestManifest::createFromOptions(
$this->_getEntity("IngestManifests('{$ingestManifestId}')")
);
} | [
"public",
"function",
"getIngestManifest",
"(",
"$",
"ingestManifest",
")",
"{",
"$",
"ingestManifestId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"ingestManifest",
",",
"'WindowsAzure\\MediaServices\\Models\\IngestManifest'",
")",
";",
"return",
"IngestManifest",... | Get IngestManifest.
@param IngestManifest|string $ingestManifest An IngestManifest data or
IngestManifest Id
@return IngestManifest | [
"Get",
"IngestManifest",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1805-L1815 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getIngestManifestList | public function getIngestManifestList()
{
$propertyList = $this->_getEntityList('IngestManifests');
$result = [];
foreach ($propertyList as $properties) {
$result[] = IngestManifest::createFromOptions($properties);
}
return $result;
} | php | public function getIngestManifestList()
{
$propertyList = $this->_getEntityList('IngestManifests');
$result = [];
foreach ($propertyList as $properties) {
$result[] = IngestManifest::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getIngestManifestList",
"(",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'IngestManifests'",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"propertyList",
"as",
"$",
"properties",
... | Get IngestManifest list.
@return IngestManifest[] | [
"Get",
"IngestManifest",
"list",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1822-L1832 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getIngestManifestAssets | public function getIngestManifestAssets($ingestManifest)
{
$ingestManifestId = Utilities::getEntityId(
$ingestManifest,
'WindowsAzure\MediaServices\Models\IngestManifest'
);
$propertyList = $this->_getEntityList(
"IngestManifests('{$ingestManifestId}')/IngestManifestAssets"
);
$result = [];
foreach ($propertyList as $properties) {
$result[] = IngestManifestAsset::createFromOptions($properties);
}
return $result;
} | php | public function getIngestManifestAssets($ingestManifest)
{
$ingestManifestId = Utilities::getEntityId(
$ingestManifest,
'WindowsAzure\MediaServices\Models\IngestManifest'
);
$propertyList = $this->_getEntityList(
"IngestManifests('{$ingestManifestId}')/IngestManifestAssets"
);
$result = [];
foreach ($propertyList as $properties) {
$result[] = IngestManifestAsset::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getIngestManifestAssets",
"(",
"$",
"ingestManifest",
")",
"{",
"$",
"ingestManifestId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"ingestManifest",
",",
"'WindowsAzure\\MediaServices\\Models\\IngestManifest'",
")",
";",
"$",
"propertyList",
... | Get IngestManifest assets.
@param IngestManifest|string $ingestManifest An IngestManifest data or
IngestManifest Id
@return IngestManifestAsset[] | [
"Get",
"IngestManifest",
"assets",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1842-L1859 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getIngestManifestStorageAccount | public function getIngestManifestStorageAccount($ingestManifest)
{
$ingestManifestId = Utilities::getEntityId(
$ingestManifest,
'WindowsAzure\MediaServices\Models\IngestManifest'
);
return StorageAccount::createFromOptions(
$this->_getEntity(
"IngestManifests('{$ingestManifestId}')/StorageAccount"
)
);
} | php | public function getIngestManifestStorageAccount($ingestManifest)
{
$ingestManifestId = Utilities::getEntityId(
$ingestManifest,
'WindowsAzure\MediaServices\Models\IngestManifest'
);
return StorageAccount::createFromOptions(
$this->_getEntity(
"IngestManifests('{$ingestManifestId}')/StorageAccount"
)
);
} | [
"public",
"function",
"getIngestManifestStorageAccount",
"(",
"$",
"ingestManifest",
")",
"{",
"$",
"ingestManifestId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"ingestManifest",
",",
"'WindowsAzure\\MediaServices\\Models\\IngestManifest'",
")",
";",
"return",
"St... | Get storage account of IngestManifest.
@param IngestManifest|string $ingestManifest An IngestManifest data
or IngestManifest Id
@return StorageAccount | [
"Get",
"storage",
"account",
"of",
"IngestManifest",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1896-L1908 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.createIngestManifestAsset | public function createIngestManifestAsset(
IngestManifestAsset $ingestManifestAsset, Asset $asset)
{
$href = urlencode($asset->getId());
$atomLink = new AtomLink();
$atomLink->setHref($this->getUri()."Assets('{$href}')");
$atomLink->setType(Resources::ATOM_ENTRY_CONTENT_TYPE);
$atomLink->setTitle('Asset');
$atomLink->setRel(Resources::MEDIA_SERVICES_ASSET_REL);
return IngestManifestAsset::createFromOptions(
$this->_createEntity(
$ingestManifestAsset,
'IngestManifestAssets',
[$atomLink]
)
);
} | php | public function createIngestManifestAsset(
IngestManifestAsset $ingestManifestAsset, Asset $asset)
{
$href = urlencode($asset->getId());
$atomLink = new AtomLink();
$atomLink->setHref($this->getUri()."Assets('{$href}')");
$atomLink->setType(Resources::ATOM_ENTRY_CONTENT_TYPE);
$atomLink->setTitle('Asset');
$atomLink->setRel(Resources::MEDIA_SERVICES_ASSET_REL);
return IngestManifestAsset::createFromOptions(
$this->_createEntity(
$ingestManifestAsset,
'IngestManifestAssets',
[$atomLink]
)
);
} | [
"public",
"function",
"createIngestManifestAsset",
"(",
"IngestManifestAsset",
"$",
"ingestManifestAsset",
",",
"Asset",
"$",
"asset",
")",
"{",
"$",
"href",
"=",
"urlencode",
"(",
"$",
"asset",
"->",
"getId",
"(",
")",
")",
";",
"$",
"atomLink",
"=",
"new",... | Create new IngestManifestAsset.
@param IngestManifestAsset $ingestManifestAsset An IngestManifestAsset data
@param Asset $asset An Asset data to be linked with IngestManifestAsset
@return IngestManifestAsset | [
"Create",
"new",
"IngestManifestAsset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1948-L1966 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getIngestManifestAsset | public function getIngestManifestAsset($ingestManifestAsset)
{
$ingestManifestAssetId = Utilities::getEntityId(
$ingestManifestAsset,
'WindowsAzure\MediaServices\Models\IngestManifestAsset'
);
return IngestManifestAsset::createFromOptions(
$this->_getEntity("IngestManifestAssets('{$ingestManifestAssetId}')")
);
} | php | public function getIngestManifestAsset($ingestManifestAsset)
{
$ingestManifestAssetId = Utilities::getEntityId(
$ingestManifestAsset,
'WindowsAzure\MediaServices\Models\IngestManifestAsset'
);
return IngestManifestAsset::createFromOptions(
$this->_getEntity("IngestManifestAssets('{$ingestManifestAssetId}')")
);
} | [
"public",
"function",
"getIngestManifestAsset",
"(",
"$",
"ingestManifestAsset",
")",
"{",
"$",
"ingestManifestAssetId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"ingestManifestAsset",
",",
"'WindowsAzure\\MediaServices\\Models\\IngestManifestAsset'",
")",
";",
"ret... | Get IngestManifestAsset.
@param IngestManifestAsset|string $ingestManifestAsset An
IngestManifestAsset data or IngestManifestAsset Id
@return IngestManifestAsset | [
"Get",
"IngestManifestAsset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1976-L1986 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getIngestManifestAssetList | public function getIngestManifestAssetList()
{
$propertyList = $this->_getEntityList('IngestManifestAssets');
$result = [];
foreach ($propertyList as $properties) {
$result[] = IngestManifestAsset::createFromOptions($properties);
}
return $result;
} | php | public function getIngestManifestAssetList()
{
$propertyList = $this->_getEntityList('IngestManifestAssets');
$result = [];
foreach ($propertyList as $properties) {
$result[] = IngestManifestAsset::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getIngestManifestAssetList",
"(",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'IngestManifestAssets'",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"propertyList",
"as",
"$",
"pro... | Get list of IngestManifestAsset.
@return IngestManifestAsset[] | [
"Get",
"list",
"of",
"IngestManifestAsset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L1993-L2003 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getIngestManifestAssetFiles | public function getIngestManifestAssetFiles($ingestManifestAsset)
{
$ingestManifestAssetId = Utilities::getEntityId(
$ingestManifestAsset,
'WindowsAzure\MediaServices\Models\IngestManifestAsset'
);
$propertyList = $this->_getEntityList(
"IngestManifestAssets('{$ingestManifestAssetId}')/IngestManifestFiles"
);
$result = [];
foreach ($propertyList as $properties) {
$result[] = IngestManifestFile::createFromOptions($properties);
}
return $result;
} | php | public function getIngestManifestAssetFiles($ingestManifestAsset)
{
$ingestManifestAssetId = Utilities::getEntityId(
$ingestManifestAsset,
'WindowsAzure\MediaServices\Models\IngestManifestAsset'
);
$propertyList = $this->_getEntityList(
"IngestManifestAssets('{$ingestManifestAssetId}')/IngestManifestFiles"
);
$result = [];
foreach ($propertyList as $properties) {
$result[] = IngestManifestFile::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getIngestManifestAssetFiles",
"(",
"$",
"ingestManifestAsset",
")",
"{",
"$",
"ingestManifestAssetId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"ingestManifestAsset",
",",
"'WindowsAzure\\MediaServices\\Models\\IngestManifestAsset'",
")",
";",
... | Get IngestManifestFiles of IngestManifestAsset.
@param IngestManifestAsset|string $ingestManifestAsset An IngestManifestAsset data or IngestManifestAsset Id
@return IngestManifestFile[] | [
"Get",
"IngestManifestFiles",
"of",
"IngestManifestAsset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2012-L2029 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getIngestManifestFile | public function getIngestManifestFile($ingestManifestFile)
{
$ingestManifestFileId = Utilities::getEntityId(
$ingestManifestFile,
'WindowsAzure\MediaServices\Models\IngestManifestFile'
);
return IngestManifestFile::createFromOptions(
$this->_getEntity("IngestManifestFiles('{$ingestManifestFileId}')")
);
} | php | public function getIngestManifestFile($ingestManifestFile)
{
$ingestManifestFileId = Utilities::getEntityId(
$ingestManifestFile,
'WindowsAzure\MediaServices\Models\IngestManifestFile'
);
return IngestManifestFile::createFromOptions(
$this->_getEntity("IngestManifestFiles('{$ingestManifestFileId}')")
);
} | [
"public",
"function",
"getIngestManifestFile",
"(",
"$",
"ingestManifestFile",
")",
"{",
"$",
"ingestManifestFileId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"ingestManifestFile",
",",
"'WindowsAzure\\MediaServices\\Models\\IngestManifestFile'",
")",
";",
"return",... | Get IngestManifestFile.
@param IngestManifestFile|string $ingestManifestFile An
IngestManifestFile data or IngestManifestFile Id
@return IngestManifestFile | [
"Get",
"IngestManifestFile",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2069-L2079 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getIngestManifestFileList | public function getIngestManifestFileList()
{
$propertyList = $this->_getEntityList('IngestManifestFiles');
$result = [];
foreach ($propertyList as $properties) {
$result[] = IngestManifestFile::createFromOptions($properties);
}
return $result;
} | php | public function getIngestManifestFileList()
{
$propertyList = $this->_getEntityList('IngestManifestFiles');
$result = [];
foreach ($propertyList as $properties) {
$result[] = IngestManifestFile::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getIngestManifestFileList",
"(",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'IngestManifestFiles'",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"propertyList",
"as",
"$",
"prope... | Get list of IngestManifestFile.
@return IngestManifestFile[] | [
"Get",
"list",
"of",
"IngestManifestFile",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2086-L2096 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getContentKeyList | public function getContentKeyList(array $queryParams = [])
{
$propertyList = $this->_getEntityList('ContentKeys', $queryParams);
$result = [];
foreach ($propertyList as $properties) {
$result[] = ContentKey::createFromOptions($properties);
}
return $result;
} | php | public function getContentKeyList(array $queryParams = [])
{
$propertyList = $this->_getEntityList('ContentKeys', $queryParams);
$result = [];
foreach ($propertyList as $properties) {
$result[] = ContentKey::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getContentKeyList",
"(",
"array",
"$",
"queryParams",
"=",
"[",
"]",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'ContentKeys'",
",",
"$",
"queryParams",
")",
";",
"$",
"result",
"=",
"[",
"]",
";... | Get list of ContentKey.
@return ContentKey[] | [
"Get",
"list",
"of",
"ContentKey",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2132-L2142 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getContentKey | public function getContentKey($contentKey)
{
$contentKeyId = Utilities::getEntityId(
$contentKey,
'WindowsAzure\MediaServices\Models\ContentKey'
);
return ContentKey::createFromOptions(
$this->_getEntity("ContentKeys('{$contentKeyId}')")
);
} | php | public function getContentKey($contentKey)
{
$contentKeyId = Utilities::getEntityId(
$contentKey,
'WindowsAzure\MediaServices\Models\ContentKey'
);
return ContentKey::createFromOptions(
$this->_getEntity("ContentKeys('{$contentKeyId}')")
);
} | [
"public",
"function",
"getContentKey",
"(",
"$",
"contentKey",
")",
"{",
"$",
"contentKeyId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"contentKey",
",",
"'WindowsAzure\\MediaServices\\Models\\ContentKey'",
")",
";",
"return",
"ContentKey",
"::",
"createFromOp... | Get ContentKey.
@param ContentKey|string $contentKey An ContentKey data or
ContentKey Id
@return ContentKey | [
"Get",
"ContentKey",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2152-L2162 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.rebindContentKey | public function rebindContentKey($contentKey, $x509Certificate)
{
$contentKeyId = Utilities::getEntityId(
$contentKey,
'WindowsAzure\MediaServices\Models\ContentKey'
);
$contentKeyId = urlencode($contentKeyId);
$x509Certificate = urlencode($x509Certificate);
$method = Resources::HTTP_GET;
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_OK;
$path = "RebindContentKey?id='{$contentKeyId}'".
"&x509Certificate='{$x509Certificate}'";
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
$key = (string) simplexml_load_string($response->getBody());
return base64_decode($key);
} | php | public function rebindContentKey($contentKey, $x509Certificate)
{
$contentKeyId = Utilities::getEntityId(
$contentKey,
'WindowsAzure\MediaServices\Models\ContentKey'
);
$contentKeyId = urlencode($contentKeyId);
$x509Certificate = urlencode($x509Certificate);
$method = Resources::HTTP_GET;
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_OK;
$path = "RebindContentKey?id='{$contentKeyId}'".
"&x509Certificate='{$x509Certificate}'";
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
$key = (string) simplexml_load_string($response->getBody());
return base64_decode($key);
} | [
"public",
"function",
"rebindContentKey",
"(",
"$",
"contentKey",
",",
"$",
"x509Certificate",
")",
"{",
"$",
"contentKeyId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"contentKey",
",",
"'WindowsAzure\\MediaServices\\Models\\ContentKey'",
")",
";",
"$",
"con... | Rebind ContentKey.
@param ContentKey|string $contentKey An ContentKey data or ContentKey Id
@param string $x509Certificate X.509 certificate (with only the public key) that was used to encrypt
the clear storage encryption/common protection content keys
@return string Content key | [
"Rebind",
"ContentKey",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2183-L2213 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getProtectionKeyId | public function getProtectionKeyId($contentKeyType)
{
Validate::isInteger($contentKeyType, 'contentKeyType');
$method = Resources::HTTP_GET;
$path = "GetProtectionKeyId?contentKeyType={$contentKeyType}";
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_OK;
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
return (string) simplexml_load_string($response->getBody());
} | php | public function getProtectionKeyId($contentKeyType)
{
Validate::isInteger($contentKeyType, 'contentKeyType');
$method = Resources::HTTP_GET;
$path = "GetProtectionKeyId?contentKeyType={$contentKeyType}";
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_OK;
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
return (string) simplexml_load_string($response->getBody());
} | [
"public",
"function",
"getProtectionKeyId",
"(",
"$",
"contentKeyType",
")",
"{",
"Validate",
"::",
"isInteger",
"(",
"$",
"contentKeyType",
",",
"'contentKeyType'",
")",
";",
"$",
"method",
"=",
"Resources",
"::",
"HTTP_GET",
";",
"$",
"path",
"=",
"\"GetProt... | The GetProtectionKeyId function retrieves an X.509 certificate thumbprint that
is used to ensure that you have the correct certificate installed on your
machine when encrypting your user-defined content key.
@param int $contentKeyType ContentKey type
@return string | [
"The",
"GetProtectionKeyId",
"function",
"retrieves",
"an",
"X",
".",
"509",
"certificate",
"thumbprint",
"that",
"is",
"used",
"to",
"ensure",
"that",
"you",
"have",
"the",
"correct",
"certificate",
"installed",
"on",
"your",
"machine",
"when",
"encrypting",
"y... | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2240-L2261 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getProtectionKey | public function getProtectionKey($protectionKeyId)
{
Validate::isString($protectionKeyId, 'protectionKeyId');
$method = Resources::HTTP_GET;
$path = "GetProtectionKey?ProtectionKeyId='{$protectionKeyId}'";
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_OK;
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
$encoded = (string) simplexml_load_string($response->getBody());
$encoded = implode("\n", str_split($encoded, 76));
$encoded = "-----BEGIN CERTIFICATE-----\n".$encoded;
$encoded .= "\n-----END CERTIFICATE-----";
return $encoded;
} | php | public function getProtectionKey($protectionKeyId)
{
Validate::isString($protectionKeyId, 'protectionKeyId');
$method = Resources::HTTP_GET;
$path = "GetProtectionKey?ProtectionKeyId='{$protectionKeyId}'";
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_OK;
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
$encoded = (string) simplexml_load_string($response->getBody());
$encoded = implode("\n", str_split($encoded, 76));
$encoded = "-----BEGIN CERTIFICATE-----\n".$encoded;
$encoded .= "\n-----END CERTIFICATE-----";
return $encoded;
} | [
"public",
"function",
"getProtectionKey",
"(",
"$",
"protectionKeyId",
")",
"{",
"Validate",
"::",
"isString",
"(",
"$",
"protectionKeyId",
",",
"'protectionKeyId'",
")",
";",
"$",
"method",
"=",
"Resources",
"::",
"HTTP_GET",
";",
"$",
"path",
"=",
"\"GetProt... | Retrieve the specific X.509 certificate that should be used to encrypt your
user-defined content key.
@param string $protectionKeyId ProtectionKey id
@return string | [
"Retrieve",
"the",
"specific",
"X",
".",
"509",
"certificate",
"that",
"should",
"be",
"used",
"to",
"encrypt",
"your",
"user",
"-",
"defined",
"content",
"key",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2271-L2297 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getContentKeyAuthorizationPolicy | public function getContentKeyAuthorizationPolicy($contentKeyAuthorizationPolicy)
{
$contentKeyAuthorizationPolicyId = Utilities::getEntityId(
$contentKeyAuthorizationPolicy,
'WindowsAzure\MediaServices\Models\ContentKeyAuthorizationPolicy'
);
return ContentKeyAuthorizationPolicy::createFromOptions(
$this->_getEntity("ContentKeyAuthorizationPolicies('{$contentKeyAuthorizationPolicyId}')")
);
} | php | public function getContentKeyAuthorizationPolicy($contentKeyAuthorizationPolicy)
{
$contentKeyAuthorizationPolicyId = Utilities::getEntityId(
$contentKeyAuthorizationPolicy,
'WindowsAzure\MediaServices\Models\ContentKeyAuthorizationPolicy'
);
return ContentKeyAuthorizationPolicy::createFromOptions(
$this->_getEntity("ContentKeyAuthorizationPolicies('{$contentKeyAuthorizationPolicyId}')")
);
} | [
"public",
"function",
"getContentKeyAuthorizationPolicy",
"(",
"$",
"contentKeyAuthorizationPolicy",
")",
"{",
"$",
"contentKeyAuthorizationPolicyId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"contentKeyAuthorizationPolicy",
",",
"'WindowsAzure\\MediaServices\\Models\\Con... | Get content key authorization policy.
@param ContentKeyAuthorizationPolicy|string $contentKeyAuthorizationPolicy ContentKeyAuthorizationPolicies data
or content key authorization policy Id
@return ContentKeyAuthorizationPolicy | [
"Get",
"content",
"key",
"authorization",
"policy",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2322-L2332 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getContentKeyAuthorizationPolicyList | public function getContentKeyAuthorizationPolicyList()
{
$propertyList = $this->_getEntityList('ContentKeyAuthorizationPolicies');
$result = [];
foreach ($propertyList as $properties) {
$result[] = ContentKeyAuthorizationPolicy::createFromOptions($properties);
}
return $result;
} | php | public function getContentKeyAuthorizationPolicyList()
{
$propertyList = $this->_getEntityList('ContentKeyAuthorizationPolicies');
$result = [];
foreach ($propertyList as $properties) {
$result[] = ContentKeyAuthorizationPolicy::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getContentKeyAuthorizationPolicyList",
"(",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'ContentKeyAuthorizationPolicies'",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"propertyList",
... | Get content key authorization policies list.
@return ContentKeyAuthorizationPolicy[] | [
"Get",
"content",
"key",
"authorization",
"policies",
"list",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2339-L2349 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getContentKeyAuthorizationPolicyOption | public function getContentKeyAuthorizationPolicyOption($contentKeyAuthorizationOptions)
{
$contentKeyAuthorizationOptionsId = Utilities::getEntityId(
$contentKeyAuthorizationOptions,
'WindowsAzure\MediaServices\Models\ContentKeyAuthorizationPolicyOption'
);
return ContentKeyAuthorizationPolicyOption::createFromOptions(
$this->_getEntity("ContentKeyAuthorizationPolicyOptions('{$contentKeyAuthorizationOptionsId}')")
);
} | php | public function getContentKeyAuthorizationPolicyOption($contentKeyAuthorizationOptions)
{
$contentKeyAuthorizationOptionsId = Utilities::getEntityId(
$contentKeyAuthorizationOptions,
'WindowsAzure\MediaServices\Models\ContentKeyAuthorizationPolicyOption'
);
return ContentKeyAuthorizationPolicyOption::createFromOptions(
$this->_getEntity("ContentKeyAuthorizationPolicyOptions('{$contentKeyAuthorizationOptionsId}')")
);
} | [
"public",
"function",
"getContentKeyAuthorizationPolicyOption",
"(",
"$",
"contentKeyAuthorizationOptions",
")",
"{",
"$",
"contentKeyAuthorizationOptionsId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"contentKeyAuthorizationOptions",
",",
"'WindowsAzure\\MediaServices\\Mo... | Get content key authorization option by id.
@param ContentKeyAuthorizationPolicy|string $contentKeyAuthorizationOptions ContentKeyAuthorizationPolicies data
or content key authorization policy
Id
@return ContentKeyAuthorizationPolicyOption | [
"Get",
"content",
"key",
"authorization",
"option",
"by",
"id",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2405-L2415 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getContentKeyAuthorizationPolicyOptionList | public function getContentKeyAuthorizationPolicyOptionList()
{
$propertyList = $this->_getEntityList('ContentKeyAuthorizationPolicyOptions');
$result = [];
foreach ($propertyList as $properties) {
$result[] = ContentKeyAuthorizationPolicyOption::createFromOptions($properties);
}
return $result;
} | php | public function getContentKeyAuthorizationPolicyOptionList()
{
$propertyList = $this->_getEntityList('ContentKeyAuthorizationPolicyOptions');
$result = [];
foreach ($propertyList as $properties) {
$result[] = ContentKeyAuthorizationPolicyOption::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getContentKeyAuthorizationPolicyOptionList",
"(",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'ContentKeyAuthorizationPolicyOptions'",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"prop... | Get content key authorization options.
@return array of Models\ContentKeyAuthorizationPolicyOption | [
"Get",
"content",
"key",
"authorization",
"options",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2422-L2432 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getContentKeyAuthorizationPolicyLinkedOptions | public function getContentKeyAuthorizationPolicyLinkedOptions($policy)
{
$policyId = Utilities::getEntityId(
$policy,
'WindowsAzure\MediaServices\Models\ContentKeyAuthorizationPolicy'
);
$propertyList = $this->_getEntityList("ContentKeyAuthorizationPolicies('{$policyId}')/Options");
$result = [];
foreach ($propertyList as $properties) {
$result[] = ContentKeyAuthorizationPolicyOption::createFromOptions($properties);
}
return $result;
} | php | public function getContentKeyAuthorizationPolicyLinkedOptions($policy)
{
$policyId = Utilities::getEntityId(
$policy,
'WindowsAzure\MediaServices\Models\ContentKeyAuthorizationPolicy'
);
$propertyList = $this->_getEntityList("ContentKeyAuthorizationPolicies('{$policyId}')/Options");
$result = [];
foreach ($propertyList as $properties) {
$result[] = ContentKeyAuthorizationPolicyOption::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getContentKeyAuthorizationPolicyLinkedOptions",
"(",
"$",
"policy",
")",
"{",
"$",
"policyId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"policy",
",",
"'WindowsAzure\\MediaServices\\Models\\ContentKeyAuthorizationPolicy'",
")",
";",
"$",
"pr... | Get ContentKeyAuthorizationPolicy linked Options.
@param ContentKeyAuthorizationPolicy|string $policy ContentKeyAuthorizationPolicy data or
ContentKeyAuthorizationPolicy Id
@return ContentKeyAuthorizationPolicyOption[] | [
"Get",
"ContentKeyAuthorizationPolicy",
"linked",
"Options",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2473-L2488 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.removeOptionsFromContentKeyAuthorizationPolicy | public function removeOptionsFromContentKeyAuthorizationPolicy($options, $policy)
{
$optionsId = Utilities::getEntityId(
$options,
'WindowsAzure\MediaServices\Models\ContentKeyAuthorizationPolicyOption'
);
$policyId = Utilities::getEntityId(
$policy,
'WindowsAzure\MediaServices\Models\ContentKeyAuthorizationPolicy'
);
$method = Resources::HTTP_DELETE;
$path = "ContentKeyAuthorizationPolicies('{$policyId}')/\$links/Options('{$optionsId}')";
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_NO_CONTENT;
$this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
} | php | public function removeOptionsFromContentKeyAuthorizationPolicy($options, $policy)
{
$optionsId = Utilities::getEntityId(
$options,
'WindowsAzure\MediaServices\Models\ContentKeyAuthorizationPolicyOption'
);
$policyId = Utilities::getEntityId(
$policy,
'WindowsAzure\MediaServices\Models\ContentKeyAuthorizationPolicy'
);
$method = Resources::HTTP_DELETE;
$path = "ContentKeyAuthorizationPolicies('{$policyId}')/\$links/Options('{$optionsId}')";
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_NO_CONTENT;
$this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
} | [
"public",
"function",
"removeOptionsFromContentKeyAuthorizationPolicy",
"(",
"$",
"options",
",",
"$",
"policy",
")",
"{",
"$",
"optionsId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"options",
",",
"'WindowsAzure\\MediaServices\\Models\\ContentKeyAuthorizationPolicy... | Remove ContentKeyAuthorizationPolicyOption from ContentKeyAuthorizationPolicy.
@param ContentKeyAuthorizationPolicyOption|string $options ContentKeyAuthorizationPolicyOption to remove from
ContentKeyAuthorizationPolicy or
ContentKeyAuthorizationPolicyOption id
@param ContentKeyAuthorizationPolicy|string $policy ContentKeyAuthorizationPolicy to remove or
ContentKeyAuthorizationPolicy id | [
"Remove",
"ContentKeyAuthorizationPolicyOption",
"from",
"ContentKeyAuthorizationPolicy",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2553-L2580 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getAssetDeliveryPolicy | public function getAssetDeliveryPolicy($assetDeliveryPolicy)
{
$assetDeliveryPolicyId = Utilities::getEntityId(
$assetDeliveryPolicy,
'WindowsAzure\MediaServices\Models\ContentKeyAuthorizationPolicy'
);
return AssetDeliveryPolicy::createFromOptions($this->_getEntity("AssetDeliveryPolicies('{$assetDeliveryPolicyId}')"));
} | php | public function getAssetDeliveryPolicy($assetDeliveryPolicy)
{
$assetDeliveryPolicyId = Utilities::getEntityId(
$assetDeliveryPolicy,
'WindowsAzure\MediaServices\Models\ContentKeyAuthorizationPolicy'
);
return AssetDeliveryPolicy::createFromOptions($this->_getEntity("AssetDeliveryPolicies('{$assetDeliveryPolicyId}')"));
} | [
"public",
"function",
"getAssetDeliveryPolicy",
"(",
"$",
"assetDeliveryPolicy",
")",
"{",
"$",
"assetDeliveryPolicyId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"assetDeliveryPolicy",
",",
"'WindowsAzure\\MediaServices\\Models\\ContentKeyAuthorizationPolicy'",
")",
"... | Get asset delivery policy.
@param ContentKeyAuthorizationPolicy|string $assetDeliveryPolicy
@return AssetDeliveryPolicy | [
"Get",
"asset",
"delivery",
"policy",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2601-L2609 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getAssetDeliveryPolicyList | public function getAssetDeliveryPolicyList()
{
$propertyList = $this->_getEntityList('AssetDeliveryPolicies');
$result = [];
foreach ($propertyList as $properties) {
$result[] = AssetDeliveryPolicy::createFromOptions($properties);
}
return $result;
} | php | public function getAssetDeliveryPolicyList()
{
$propertyList = $this->_getEntityList('AssetDeliveryPolicies');
$result = [];
foreach ($propertyList as $properties) {
$result[] = AssetDeliveryPolicy::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getAssetDeliveryPolicyList",
"(",
")",
"{",
"$",
"propertyList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'AssetDeliveryPolicies'",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"propertyList",
"as",
"$",
"pr... | Get asset delivery policies list.
@return AssetDeliveryPolicy[] | [
"Get",
"asset",
"delivery",
"policies",
"list",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2616-L2626 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getAssetLinkedDeliveryPolicy | public function getAssetLinkedDeliveryPolicy($asset)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$propertyList = $this->_getEntityList("Assets('{$assetId}')/DeliveryPolicies");
$result = [];
foreach ($propertyList as $properties) {
$result[] = AssetDeliveryPolicy::createFromOptions($properties);
}
return $result;
} | php | public function getAssetLinkedDeliveryPolicy($asset)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$propertyList = $this->_getEntityList("Assets('{$assetId}')/DeliveryPolicies");
$result = [];
foreach ($propertyList as $properties) {
$result[] = AssetDeliveryPolicy::createFromOptions($properties);
}
return $result;
} | [
"public",
"function",
"getAssetLinkedDeliveryPolicy",
"(",
"$",
"asset",
")",
"{",
"$",
"assetId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"asset",
",",
"'WindowsAzure\\MediaServices\\Models\\Asset'",
")",
";",
"$",
"propertyList",
"=",
"$",
"this",
"->",... | Get AssetDeliveryPolicy list linked to an Asset.
@param Asset|string $asset Asset data or Asset Id to retrieve the linked delivery policies
@return AssetDeliveryPolicy[] | [
"Get",
"AssetDeliveryPolicy",
"list",
"linked",
"to",
"an",
"Asset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2660-L2675 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.removeDeliveryPolicyFromAsset | public function removeDeliveryPolicyFromAsset($asset, $policy)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$policyId = Utilities::getEntityId(
$policy,
'WindowsAzure\MediaServices\Models\AssetDeliveryPolicy'
);
$method = Resources::HTTP_DELETE;
$path = "Assets('{$assetId}')/\$links/DeliveryPolicies('{$policyId}')";
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_NO_CONTENT;
$this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
} | php | public function removeDeliveryPolicyFromAsset($asset, $policy)
{
$assetId = Utilities::getEntityId(
$asset,
'WindowsAzure\MediaServices\Models\Asset'
);
$policyId = Utilities::getEntityId(
$policy,
'WindowsAzure\MediaServices\Models\AssetDeliveryPolicy'
);
$method = Resources::HTTP_DELETE;
$path = "Assets('{$assetId}')/\$links/DeliveryPolicies('{$policyId}')";
$headers = [];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_NO_CONTENT;
$this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode
);
} | [
"public",
"function",
"removeDeliveryPolicyFromAsset",
"(",
"$",
"asset",
",",
"$",
"policy",
")",
"{",
"$",
"assetId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"asset",
",",
"'WindowsAzure\\MediaServices\\Models\\Asset'",
")",
";",
"$",
"policyId",
"=",
... | Remove AssetDeliveryPolicy from Asset.
@param Asset|string $asset Asset to remove a AssetDeliveryPolicy or
Asset id
@param AssetDeliveryPolicy|string $policy DeliveryPolicy to remove or
DeliveryPolicy id | [
"Remove",
"AssetDeliveryPolicy",
"from",
"Asset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2736-L2763 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getKeyDeliveryUrl | 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 = [
Resources::CONTENT_TYPE => Resources::JSON_CONTENT_TYPE,
];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_OK;
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode,
$body
);
return simplexml_load_string($response->getBody())->__toString();
} | php | 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 = [
Resources::CONTENT_TYPE => Resources::JSON_CONTENT_TYPE,
];
$postParams = [];
$queryParams = [];
$statusCode = Resources::STATUS_OK;
$response = $this->sendHttp(
$method,
$headers,
$queryParams,
$postParams,
$path,
$statusCode,
$body
);
return simplexml_load_string($response->getBody())->__toString();
} | [
"public",
"function",
"getKeyDeliveryUrl",
"(",
"$",
"contentKey",
",",
"$",
"contentKeyDeliveryType",
")",
"{",
"$",
"contentKeyId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"contentKey",
",",
"'WindowsAzure\\MediaServices\\Models\\ContentKey'",
")",
";",
"$"... | Link AssetDeliveryPolicy to Asset.
@param ContentKey|string $contentKey Asset to link a AssetDeliveryPolicy or
Asset id
@param AssetDeliveryPolicy|string $contentKeyDeliveryType DeliveryPolicy to link or
DeliveryPolicy id
@return string | [
"Link",
"AssetDeliveryPolicy",
"to",
"Asset",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2775-L2805 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getEncodingReservedUnit | public function getEncodingReservedUnit()
{
$units = $this->_getEntityList('EncodingReservedUnitTypes');
if (isset($units) && count($units) > 0) {
return EncodingReservedUnit::createFromOptions($units[0]);
}
return null;
} | php | public function getEncodingReservedUnit()
{
$units = $this->_getEntityList('EncodingReservedUnitTypes');
if (isset($units) && count($units) > 0) {
return EncodingReservedUnit::createFromOptions($units[0]);
}
return null;
} | [
"public",
"function",
"getEncodingReservedUnit",
"(",
")",
"{",
"$",
"units",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'EncodingReservedUnitTypes'",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"units",
")",
"&&",
"count",
"(",
"$",
"units",
")",
">",
... | Get encoding reserved units settings.
@return EncodingReservedUnit|null | [
"Get",
"encoding",
"reserved",
"units",
"settings",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2812-L2820 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.updateEncodingReservedUnit | public function updateEncodingReservedUnit(EncodingReservedUnit $encodingReservedUnit)
{
$accountID = $encodingReservedUnit->getAccountId();
$encodingReservedUnit->setAccountId(null); // never send account Id
$this->_updateEntity($encodingReservedUnit, "EncodingReservedUnitTypes(guid'{$accountID}')");
$encodingReservedUnit->setAccountId($accountID);
} | php | public function updateEncodingReservedUnit(EncodingReservedUnit $encodingReservedUnit)
{
$accountID = $encodingReservedUnit->getAccountId();
$encodingReservedUnit->setAccountId(null); // never send account Id
$this->_updateEntity($encodingReservedUnit, "EncodingReservedUnitTypes(guid'{$accountID}')");
$encodingReservedUnit->setAccountId($accountID);
} | [
"public",
"function",
"updateEncodingReservedUnit",
"(",
"EncodingReservedUnit",
"$",
"encodingReservedUnit",
")",
"{",
"$",
"accountID",
"=",
"$",
"encodingReservedUnit",
"->",
"getAccountId",
"(",
")",
";",
"$",
"encodingReservedUnit",
"->",
"setAccountId",
"(",
"nu... | Update encoding reserved units settings.
@param EncodingReservedUnit $encodingReservedUnit Update data valid idli | [
"Update",
"encoding",
"reserved",
"units",
"settings",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2827-L2833 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getOperation | public function getOperation($operation)
{
$operationId = Utilities::getEntityId(
$operation,
'WindowsAzure\MediaServices\Models\Operation'
);
return Operation::createFromOptions($this->_getEntity("Operations('{$operationId}')"));
} | php | public function getOperation($operation)
{
$operationId = Utilities::getEntityId(
$operation,
'WindowsAzure\MediaServices\Models\Operation'
);
return Operation::createFromOptions($this->_getEntity("Operations('{$operationId}')"));
} | [
"public",
"function",
"getOperation",
"(",
"$",
"operation",
")",
"{",
"$",
"operationId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"operation",
",",
"'WindowsAzure\\MediaServices\\Models\\Operation'",
")",
";",
"return",
"Operation",
"::",
"createFromOptions"... | Get the Operation entity.
@param Operation|string $operation The operation id
@return Operation | [
"Get",
"the",
"Operation",
"entity",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2842-L2850 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.awaitOperation | public function awaitOperation(Operation $operation, $interval = 5)
{
while ($operation->getState() == OperationState::InProgress) {
$operation = $this->getOperation($operation);
if ($operation->getState() == OperationState::InProgress) {
sleep($interval);
}
}
return $operation;
} | php | public function awaitOperation(Operation $operation, $interval = 5)
{
while ($operation->getState() == OperationState::InProgress) {
$operation = $this->getOperation($operation);
if ($operation->getState() == OperationState::InProgress) {
sleep($interval);
}
}
return $operation;
} | [
"public",
"function",
"awaitOperation",
"(",
"Operation",
"$",
"operation",
",",
"$",
"interval",
"=",
"5",
")",
"{",
"while",
"(",
"$",
"operation",
"->",
"getState",
"(",
")",
"==",
"OperationState",
"::",
"InProgress",
")",
"{",
"$",
"operation",
"=",
... | Utility method to await for an Operation finishes.
@param Operation $operation The Operation object to await for
@param int $interval
@return Operation | [
"Utility",
"method",
"to",
"await",
"for",
"an",
"Operation",
"finishes",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2860-L2870 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.sendUpdateChannelOperation | public function sendUpdateChannelOperation(Channel $channel)
{
$channelId = $channel->getId();
Validate::notNull($channelId, 'channelId');
return $this->_sendOperation(
$channel,
"Channels('{$channelId}')",
Resources::HTTP_MERGE,
[Resources::STATUS_ACCEPTED, Resources::STATUS_NO_CONTENT]);
} | php | public function sendUpdateChannelOperation(Channel $channel)
{
$channelId = $channel->getId();
Validate::notNull($channelId, 'channelId');
return $this->_sendOperation(
$channel,
"Channels('{$channelId}')",
Resources::HTTP_MERGE,
[Resources::STATUS_ACCEPTED, Resources::STATUS_NO_CONTENT]);
} | [
"public",
"function",
"sendUpdateChannelOperation",
"(",
"Channel",
"$",
"channel",
")",
"{",
"$",
"channelId",
"=",
"$",
"channel",
"->",
"getId",
"(",
")",
";",
"Validate",
"::",
"notNull",
"(",
"$",
"channelId",
",",
"'channelId'",
")",
";",
"return",
"... | Send Update operation.
@param Channel $channel Channel data
@return Operation The operation to track the channel update | [
"Send",
"Update",
"operation",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2891-L2901 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getChannel | public function getChannel($channel)
{
$channelId = Utilities::getEntityId(
$channel,
'WindowsAzure\MediaServices\Models\Channel'
);
return Channel::createFromOptions($this->_getEntity("Channels('{$channelId}')"));
} | php | public function getChannel($channel)
{
$channelId = Utilities::getEntityId(
$channel,
'WindowsAzure\MediaServices\Models\Channel'
);
return Channel::createFromOptions($this->_getEntity("Channels('{$channelId}')"));
} | [
"public",
"function",
"getChannel",
"(",
"$",
"channel",
")",
"{",
"$",
"channelId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"channel",
",",
"'WindowsAzure\\MediaServices\\Models\\Channel'",
")",
";",
"return",
"Channel",
"::",
"createFromOptions",
"(",
"... | Get existing channel.
@param Channel|string $channel Channel data
@return Channel Created Channel | [
"Get",
"existing",
"channel",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2910-L2918 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.sendDeleteChannelOperation | public function sendDeleteChannelOperation($channel)
{
$channelId = Utilities::getEntityId(
$channel,
'WindowsAzure\MediaServices\Models\Channel'
);
return $this->_sendOperation(null, "Channels('{$channelId}')", Resources::HTTP_DELETE);
} | php | public function sendDeleteChannelOperation($channel)
{
$channelId = Utilities::getEntityId(
$channel,
'WindowsAzure\MediaServices\Models\Channel'
);
return $this->_sendOperation(null, "Channels('{$channelId}')", Resources::HTTP_DELETE);
} | [
"public",
"function",
"sendDeleteChannelOperation",
"(",
"$",
"channel",
")",
"{",
"$",
"channelId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"channel",
",",
"'WindowsAzure\\MediaServices\\Models\\Channel'",
")",
";",
"return",
"$",
"this",
"->",
"_sendOpera... | Delete channel.
@param Channel|string $channel Channel data or channel Id
@return Operation | [
"Delete",
"channel",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2927-L2935 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.getChannelList | public function getChannelList()
{
$entityList = $this->_getEntityList('Channels');
$result = [];
foreach ($entityList as $channel) {
$result[] = Channel::createFromOptions($channel);
}
return $result;
} | php | public function getChannelList()
{
$entityList = $this->_getEntityList('Channels');
$result = [];
foreach ($entityList as $channel) {
$result[] = Channel::createFromOptions($channel);
}
return $result;
} | [
"public",
"function",
"getChannelList",
"(",
")",
"{",
"$",
"entityList",
"=",
"$",
"this",
"->",
"_getEntityList",
"(",
"'Channels'",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"entityList",
"as",
"$",
"channel",
")",
"{",
"$",
... | Get list of Channels.
@return Channel[] | [
"Get",
"list",
"of",
"Channels",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2942-L2952 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.sendStartChannelOperation | public function sendStartChannelOperation($channel)
{
$channelId = Utilities::getEntityId(
$channel,
'WindowsAzure\MediaServices\Models\Channel'
);
$headers = [
Resources::CONTENT_TYPE => Resources::JSON_CONTENT_TYPE,
];
return $this->_sendOperation(
null,
"Channels('{$channelId}')/Start",
Resources::HTTP_POST,
Resources::STATUS_ACCEPTED,
$headers);
} | php | public function sendStartChannelOperation($channel)
{
$channelId = Utilities::getEntityId(
$channel,
'WindowsAzure\MediaServices\Models\Channel'
);
$headers = [
Resources::CONTENT_TYPE => Resources::JSON_CONTENT_TYPE,
];
return $this->_sendOperation(
null,
"Channels('{$channelId}')/Start",
Resources::HTTP_POST,
Resources::STATUS_ACCEPTED,
$headers);
} | [
"public",
"function",
"sendStartChannelOperation",
"(",
"$",
"channel",
")",
"{",
"$",
"channelId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"channel",
",",
"'WindowsAzure\\MediaServices\\Models\\Channel'",
")",
";",
"$",
"headers",
"=",
"[",
"Resources",
... | Start a channel.
@param Channel|string $channel Channel data or channel Id
@return Operation | [
"Start",
"a",
"channel",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L2961-L2977 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.sendStartAdvertisementChannelOperation | public function sendStartAdvertisementChannelOperation($channel, $duration, $cueId, $showSlate)
{
$channelId = Utilities::getEntityId(
$channel,
'WindowsAzure\MediaServices\Models\Channel'
);
$headers = [
Resources::CONTENT_TYPE => Resources::JSON_CONTENT_TYPE,
];
$body = json_encode([
'duration' => $duration,
'cueId' => $cueId,
'showSlate' => ($showSlate) ? 'true' : 'false',
]);
return $this->_sendOperation(
$body,
"Channels('{$channelId}')/StartAdvertisement",
Resources::HTTP_POST,
Resources::STATUS_ACCEPTED,
$headers);
} | php | public function sendStartAdvertisementChannelOperation($channel, $duration, $cueId, $showSlate)
{
$channelId = Utilities::getEntityId(
$channel,
'WindowsAzure\MediaServices\Models\Channel'
);
$headers = [
Resources::CONTENT_TYPE => Resources::JSON_CONTENT_TYPE,
];
$body = json_encode([
'duration' => $duration,
'cueId' => $cueId,
'showSlate' => ($showSlate) ? 'true' : 'false',
]);
return $this->_sendOperation(
$body,
"Channels('{$channelId}')/StartAdvertisement",
Resources::HTTP_POST,
Resources::STATUS_ACCEPTED,
$headers);
} | [
"public",
"function",
"sendStartAdvertisementChannelOperation",
"(",
"$",
"channel",
",",
"$",
"duration",
",",
"$",
"cueId",
",",
"$",
"showSlate",
")",
"{",
"$",
"channelId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"channel",
",",
"'WindowsAzure\\Medi... | StartAdvertisement on a running channel.
@param Channel|string $channel Channel data or channel Id
@param string $duration The duration, in seconds, of the commercial break
@param string $cueId Unique ID for the commercial break
@param string $showSlate Indicates to the live encoder within the Channel that it needs to switch to the
default slate image during the commercial break
@return Operation | [
"StartAdvertisement",
"on",
"a",
"running",
"channel",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L3040-L3061 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.sendEndAdvertisementChannelOperation | public function sendEndAdvertisementChannelOperation($channel, $cueId)
{
$channelId = Utilities::getEntityId(
$channel,
'WindowsAzure\MediaServices\Models\Channel'
);
$headers = [
Resources::CONTENT_TYPE => Resources::JSON_CONTENT_TYPE,
];
$body = json_encode([
'cueId' => $cueId,
]);
return $this->_sendOperation(
$body,
"Channels('{$channelId}')/EndAdvertisement",
Resources::HTTP_POST,
Resources::STATUS_ACCEPTED,
$headers);
} | php | public function sendEndAdvertisementChannelOperation($channel, $cueId)
{
$channelId = Utilities::getEntityId(
$channel,
'WindowsAzure\MediaServices\Models\Channel'
);
$headers = [
Resources::CONTENT_TYPE => Resources::JSON_CONTENT_TYPE,
];
$body = json_encode([
'cueId' => $cueId,
]);
return $this->_sendOperation(
$body,
"Channels('{$channelId}')/EndAdvertisement",
Resources::HTTP_POST,
Resources::STATUS_ACCEPTED,
$headers);
} | [
"public",
"function",
"sendEndAdvertisementChannelOperation",
"(",
"$",
"channel",
",",
"$",
"cueId",
")",
"{",
"$",
"channelId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"channel",
",",
"'WindowsAzure\\MediaServices\\Models\\Channel'",
")",
";",
"$",
"heade... | EndAdvertisement on a running channel.
@param Channel|string $channel Channel data or channel Id
@param mixed $cueId
@return Operation | [
"EndAdvertisement",
"on",
"a",
"running",
"channel",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L3071-L3090 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.sendShowSlateChannelOperation | public function sendShowSlateChannelOperation($channel, $duration, $assetId)
{
$channelId = Utilities::getEntityId(
$channel,
'WindowsAzure\MediaServices\Models\Channel'
);
$headers = [
Resources::CONTENT_TYPE => Resources::JSON_CONTENT_TYPE,
];
$body = json_encode([
'duration' => $duration,
'assetId' => $assetId,
]);
return $this->_sendOperation(
$body,
"Channels('{$channelId}')/ShowSlate",
Resources::HTTP_POST,
Resources::STATUS_ACCEPTED,
$headers);
} | php | public function sendShowSlateChannelOperation($channel, $duration, $assetId)
{
$channelId = Utilities::getEntityId(
$channel,
'WindowsAzure\MediaServices\Models\Channel'
);
$headers = [
Resources::CONTENT_TYPE => Resources::JSON_CONTENT_TYPE,
];
$body = json_encode([
'duration' => $duration,
'assetId' => $assetId,
]);
return $this->_sendOperation(
$body,
"Channels('{$channelId}')/ShowSlate",
Resources::HTTP_POST,
Resources::STATUS_ACCEPTED,
$headers);
} | [
"public",
"function",
"sendShowSlateChannelOperation",
"(",
"$",
"channel",
",",
"$",
"duration",
",",
"$",
"assetId",
")",
"{",
"$",
"channelId",
"=",
"Utilities",
"::",
"getEntityId",
"(",
"$",
"channel",
",",
"'WindowsAzure\\MediaServices\\Models\\Channel'",
")",... | ShowSlate on a running channel.
@param Channel|string $channel Channel data or channel Id
@param string $duration The duration, in seconds, of the commercial break
@param $assetId
@return Operation | [
"ShowSlate",
"on",
"a",
"running",
"channel",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L3101-L3121 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.createChannel | public function createChannel(Channel $channel)
{
$op = $this->sendCreateChannelOperation($channel);
// waiting for create operation finishes
$op = $this->awaitOperation($op);
if ($op->getState() != OperationState::Succeeded) {
return null;
}
// get and return the createChannel
return $this->getChannel($op->getTargetEntityId());
} | php | public function createChannel(Channel $channel)
{
$op = $this->sendCreateChannelOperation($channel);
// waiting for create operation finishes
$op = $this->awaitOperation($op);
if ($op->getState() != OperationState::Succeeded) {
return null;
}
// get and return the createChannel
return $this->getChannel($op->getTargetEntityId());
} | [
"public",
"function",
"createChannel",
"(",
"Channel",
"$",
"channel",
")",
"{",
"$",
"op",
"=",
"$",
"this",
"->",
"sendCreateChannelOperation",
"(",
"$",
"channel",
")",
";",
"// waiting for create operation finishes",
"$",
"op",
"=",
"$",
"this",
"->",
"awa... | Create a Channel.
@param Channel $channel Channel data
@return Channel the created channel | [
"Create",
"a",
"Channel",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L3155-L3168 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.updateChannel | public function updateChannel(Channel $channel)
{
$op = $this->sendUpdateChannelOperation($channel);
// waiting for create operation finishes
$op = $this->awaitOperation($op);
if ($op->getState() != OperationState::Succeeded) {
return null;
}
// get and return the createChannel
return $this->getChannel($channel->getId());
} | php | public function updateChannel(Channel $channel)
{
$op = $this->sendUpdateChannelOperation($channel);
// waiting for create operation finishes
$op = $this->awaitOperation($op);
if ($op->getState() != OperationState::Succeeded) {
return null;
}
// get and return the createChannel
return $this->getChannel($channel->getId());
} | [
"public",
"function",
"updateChannel",
"(",
"Channel",
"$",
"channel",
")",
"{",
"$",
"op",
"=",
"$",
"this",
"->",
"sendUpdateChannelOperation",
"(",
"$",
"channel",
")",
";",
"// waiting for create operation finishes",
"$",
"op",
"=",
"$",
"this",
"->",
"awa... | Update a Channel.
@param Channel $channel Channel data
@return Channel the updated channel | [
"Update",
"a",
"Channel",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L3177-L3190 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.deleteChannel | public function deleteChannel($channel)
{
$op = $this->sendDeleteChannelOperation($channel);
// waiting for delete operation finishes
$op = $this->awaitOperation($op);
// true if succeeded
return $op->getState() == OperationState::Succeeded;
} | php | public function deleteChannel($channel)
{
$op = $this->sendDeleteChannelOperation($channel);
// waiting for delete operation finishes
$op = $this->awaitOperation($op);
// true if succeeded
return $op->getState() == OperationState::Succeeded;
} | [
"public",
"function",
"deleteChannel",
"(",
"$",
"channel",
")",
"{",
"$",
"op",
"=",
"$",
"this",
"->",
"sendDeleteChannelOperation",
"(",
"$",
"channel",
")",
";",
"// waiting for delete operation finishes",
"$",
"op",
"=",
"$",
"this",
"->",
"awaitOperation",... | Delete a Channel.
@param Channel|string $channel Channel data or channel Id
@return bool true if succeeded | [
"Delete",
"a",
"Channel",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L3199-L3208 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.resetChannel | public function resetChannel($channel)
{
$op = $this->sendResetChannelOperation($channel);
// waiting for reset operation finishes
$op = $this->awaitOperation($op);
// true if succeeded
return $op->getState() == OperationState::Succeeded;
} | php | public function resetChannel($channel)
{
$op = $this->sendResetChannelOperation($channel);
// waiting for reset operation finishes
$op = $this->awaitOperation($op);
// true if succeeded
return $op->getState() == OperationState::Succeeded;
} | [
"public",
"function",
"resetChannel",
"(",
"$",
"channel",
")",
"{",
"$",
"op",
"=",
"$",
"this",
"->",
"sendResetChannelOperation",
"(",
"$",
"channel",
")",
";",
"// waiting for reset operation finishes",
"$",
"op",
"=",
"$",
"this",
"->",
"awaitOperation",
... | Reset a Channel.
@param Channel|string $channel Channel data or channel Id
@return bool true if succeeded | [
"Reset",
"a",
"Channel",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L3217-L3226 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.startChannel | public function startChannel($channel)
{
$op = $this->sendStartChannelOperation($channel);
// waiting for create operation finishes
$op = $this->awaitOperation($op);
// true if succeeded
return $op->getState() == OperationState::Succeeded;
} | php | public function startChannel($channel)
{
$op = $this->sendStartChannelOperation($channel);
// waiting for create operation finishes
$op = $this->awaitOperation($op);
// true if succeeded
return $op->getState() == OperationState::Succeeded;
} | [
"public",
"function",
"startChannel",
"(",
"$",
"channel",
")",
"{",
"$",
"op",
"=",
"$",
"this",
"->",
"sendStartChannelOperation",
"(",
"$",
"channel",
")",
";",
"// waiting for create operation finishes",
"$",
"op",
"=",
"$",
"this",
"->",
"awaitOperation",
... | Start a Channel.
@param Channel|string $channel Channel data or channel Id
@return bool true if succeeded | [
"Start",
"a",
"Channel",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L3235-L3244 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.stopChannel | public function stopChannel($channel)
{
$op = $this->sendStopChannelOperation($channel);
// waiting for create operation finishes
$op = $this->awaitOperation($op);
// true if succeeded
return $op->getState() == OperationState::Succeeded;
} | php | public function stopChannel($channel)
{
$op = $this->sendStopChannelOperation($channel);
// waiting for create operation finishes
$op = $this->awaitOperation($op);
// true if succeeded
return $op->getState() == OperationState::Succeeded;
} | [
"public",
"function",
"stopChannel",
"(",
"$",
"channel",
")",
"{",
"$",
"op",
"=",
"$",
"this",
"->",
"sendStopChannelOperation",
"(",
"$",
"channel",
")",
";",
"// waiting for create operation finishes",
"$",
"op",
"=",
"$",
"this",
"->",
"awaitOperation",
"... | Stop a Channel.
@param Channel|string $channel Channel data or channel Id
@return bool true if succeeded | [
"Stop",
"a",
"Channel",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L3253-L3262 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.startAdvertisementChannel | public function startAdvertisementChannel($channel, $duration, $cueId, $showSlate)
{
$op = $this->sendStartAdvertisementChannelOperation($channel, $duration, $cueId, $showSlate);
// waiting for create operation finishes
$op = $this->awaitOperation($op);
// true if succeeded
return $op->getState() == OperationState::Succeeded;
} | php | public function startAdvertisementChannel($channel, $duration, $cueId, $showSlate)
{
$op = $this->sendStartAdvertisementChannelOperation($channel, $duration, $cueId, $showSlate);
// waiting for create operation finishes
$op = $this->awaitOperation($op);
// true if succeeded
return $op->getState() == OperationState::Succeeded;
} | [
"public",
"function",
"startAdvertisementChannel",
"(",
"$",
"channel",
",",
"$",
"duration",
",",
"$",
"cueId",
",",
"$",
"showSlate",
")",
"{",
"$",
"op",
"=",
"$",
"this",
"->",
"sendStartAdvertisementChannelOperation",
"(",
"$",
"channel",
",",
"$",
"dur... | Start Advertisement on Channel.
@param Channel|string $channel Channel data or channel Id
@param $duration
@param $cueId
@param $showSlate
@return bool true if succeeded | [
"Start",
"Advertisement",
"on",
"Channel",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L3274-L3283 | train |
Azure/azure-sdk-for-php | src/MediaServices/MediaServicesRestProxy.php | MediaServicesRestProxy.endAdvertisementChannel | public function endAdvertisementChannel($channel, $cueId)
{
$op = $this->sendEndAdvertisementChannelOperation($channel, $cueId);
// waiting for create operation finishes
$op = $this->awaitOperation($op);
// true if succeeded
return $op->getState() == OperationState::Succeeded;
} | php | public function endAdvertisementChannel($channel, $cueId)
{
$op = $this->sendEndAdvertisementChannelOperation($channel, $cueId);
// waiting for create operation finishes
$op = $this->awaitOperation($op);
// true if succeeded
return $op->getState() == OperationState::Succeeded;
} | [
"public",
"function",
"endAdvertisementChannel",
"(",
"$",
"channel",
",",
"$",
"cueId",
")",
"{",
"$",
"op",
"=",
"$",
"this",
"->",
"sendEndAdvertisementChannelOperation",
"(",
"$",
"channel",
",",
"$",
"cueId",
")",
";",
"// waiting for create operation finishe... | End Advertisement on Channel.
@param Channel|string $channel Channel data or channel Id
@param $cueId
@return bool true if succeeded | [
"End",
"Advertisement",
"on",
"Channel",
"."
] | 1e4eb9d083c73727561476ef3941c3b8b313cf04 | https://github.com/Azure/azure-sdk-for-php/blob/1e4eb9d083c73727561476ef3941c3b8b313cf04/src/MediaServices/MediaServicesRestProxy.php#L3293-L3302 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.