コード例 #1
0
ファイル: ReportService.php プロジェクト: DBezemer/server
 /**
  * 
  * will create a Csv file for the given report and return the URL to access it
  * @action getUrlForReportAsCsv
  * 
  * @param string $reportTitle The title of the report to display at top of CSV 
  * @param string $reportText The text of the filter of the report
  * @param string $headers The headers of the columns - a map between the enumerations on the server side and the their display text  
  * @param KalturaReportType $reportType  
  * @param KalturaReportInputFilter $reportInputFilter
  * @param string $dimension	  
  * @param KalturaFilterPager $pager
  * @param KalturaReportType $reportType 
  * @param string $order
  * @param string $objectIds - one ID or more (separated by ',') of specific objects to query
  * @return string 
  */
 public function getUrlForReportAsCsvAction($reportTitle, $reportText, $headers, $reportType, KalturaReportInputFilter $reportInputFilter, $dimension = null, KalturaFilterPager $pager = null, $order = null, $objectIds = null)
 {
     if ($reportType == KalturaReportType::PARTNER_USAGE || $reportType == KalturaReportType::VAR_USAGE) {
         $objectIds = $this->validateObjectsAreAllowedPartners($objectIds);
     }
     try {
         $report = myReportsMgr::getUrlForReportAsCsv($this->getPartnerId(), $reportTitle, $reportText, $headers, $reportType, $reportInputFilter->toReportsInputFilter(), $dimension, $objectIds, $pager->pageSize, $pager->pageIndex, $order);
     } catch (Exception $e) {
         $code = $e->getCode();
         if ($code == kCoreException::SEARCH_TOO_GENERAL) {
             throw new KalturaAPIException(KalturaErrors::SEARCH_TOO_GENERAL);
         }
     }
     if (infraRequestUtils::getProtocol() == infraRequestUtils::PROTOCOL_HTTPS) {
         $report = str_replace("http://", "https://", $report);
     }
     return $report;
 }
コード例 #2
0
 /**
  * 
  * will create a Csv file for the given report and return the URL to access it
  * @action getUrlForReportAsCsv
  * 
  * @param string $reportTitle The title of the report to display at top of CSV 
  * @param string $reportText The text of the filter of the report
  * @param string $headers The headers of the columns - a map between the enumerations on the server side and the their display text  
  * @param KalturaReportType $reportType  
  * @param KalturaReportInputFilter $reportInputFilter
  * @param string $dimension	  
  * @param KalturaFilterPager $pager
  * @param KalturaReportType $reportType 
  * @param string $order
  * @param string $objectIds - one ID or more (separated by ',') of specific objects to query
  * @return string 
  */
 public function getUrlForReportAsCsvAction($reportTitle, $reportText, $headers, $reportType, KalturaReportInputFilter $reportInputFilter, $dimension = null, KalturaFilterPager $pager = null, $order = null, $objectIds = null)
 {
     if ($reportType == KalturaReportType::PARTNER_USAGE || $reportType == KalturaReportType::VAR_USAGE) {
         $objectIds = $this->validateObjectsAreAllowedPartners($objectIds);
     }
     $report = myReportsMgr::getUrlForReportAsCsv($this->getPartnerId(), $reportTitle, $reportText, $headers, $reportType, $reportInputFilter->toReportsInputFilter(), $dimension, $objectIds, $pager->pageSize, $pager->pageIndex, $order);
     return $report;
 }
コード例 #3
0
ファイル: ReportService.php プロジェクト: richhl/kalturaCE
 /**
  * 
  * will create a Csv file for the given report and return the URL to access it
  * @action getUrlForReportAsCsv
  * 
  * @param string $reportTitle The title of the report to display at top of CSV 
  * @param string $reportText The text of the filter of the report
  * @param string $headers The headers of the columns - a map between the enumerations on the server side and the their display text  
  * @param KalturaReportType $reportType  
  * @param KalturaReportInputFilter $reportInputFilter
  * @param string $dimension	  
  * @param KalturaFilterPager $pager
  * @param KalturaReportType $reportType 
  * @param string $order
  * @param string $objectIds - one ID or more (separated by ',') of specific objects to query
  * @return string 
  */
 function getUrlForReportAsCsvAction($reportTitle, $reportText, $headers, $reportType, KalturaReportInputFilter $reportInputFilter, $dimension = null, KalturaFilterPager $pager = null, $order = null, $objectIds = null)
 {
     return myReportsMgr::getUrlForReportAsCsv($this->getPartnerId(), $reportTitle, $reportText, $headers, $reportType, $reportInputFilter->toReportsInputFilter(), $dimension, $objectIds, $pager->pageSize, $pager->pageIndex, $order);
 }