コード例 #1
0
 /**
  * Get the list of Programs, if channel (or channel id) is provided, then
  * returns the Programs associated to that Channel.
  *
  * @return array
  */
 public function getProgramList($channel = null)
 {
     if (is_null($channel)) {
         $entityList = $this->_getEntityList('Programs');
     } else {
         $channelId = Utilities::getEntityId($channel, 'WindowsAzure\\MediaServices\\Models\\Channel');
         $entityList = $this->_getEntityList("Channels('{$channelId}')/Programs");
     }
     $result = array();
     foreach ($entityList as $program) {
         $result[] = Program::createFromOptions($program);
     }
     return $result;
 }