コード例 #1
0
 /**
  * Search for media in one of the supported media providers
  * 	 
  * 
  * @return \Kaltura\Client\Type\SearchResultResponse
  */
 function search(\Kaltura\Client\Type\Search $search, \Kaltura\Client\Type\FilterPager $pager = null)
 {
     $kparams = array();
     $this->client->addParam($kparams, "search", $search->toParams());
     if ($pager !== null) {
         $this->client->addParam($kparams, "pager", $pager->toParams());
     }
     $this->client->queueServiceActionCall("search", "search", "KalturaSearchResultResponse", $kparams);
     if ($this->client->isMultiRequest()) {
         return $this->client->getMultiRequestResult();
     }
     $resultXml = $this->client->doQueue();
     $resultXmlObject = new \SimpleXMLElement($resultXml);
     \Kaltura\Client\ParseUtils::checkIfError($resultXmlObject->result);
     $resultObject = \Kaltura\Client\ParseUtils::unmarshalObject($resultXmlObject->result, "KalturaSearchResultResponse");
     $this->client->validateObjectType($resultObject, "\\Kaltura\\Client\\Type\\SearchResultResponse");
     return $resultObject;
 }
コード例 #2
0
 public function __construct(\SimpleXMLElement $xml = null)
 {
     parent::__construct($xml);
     if (is_null($xml)) {
         return;
     }
     $this->id = (string) $xml->id;
     $this->title = (string) $xml->title;
     $this->thumbUrl = (string) $xml->thumbUrl;
     $this->description = (string) $xml->description;
     $this->tags = (string) $xml->tags;
     $this->url = (string) $xml->url;
     $this->sourceLink = (string) $xml->sourceLink;
     $this->credit = (string) $xml->credit;
     if (count($xml->licenseType)) {
         $this->licenseType = (int) $xml->licenseType;
     }
     $this->flashPlaybackType = (string) $xml->flashPlaybackType;
     $this->fileExt = (string) $xml->fileExt;
 }