當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Report::setId方法代碼示例

本文整理匯總了PHP中Report::setId方法的典型用法代碼示例。如果您正苦於以下問題:PHP Report::setId方法的具體用法?PHP Report::setId怎麽用?PHP Report::setId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Report的用法示例。


在下文中一共展示了Report::setId方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: makeReportBySavedCalendar

 /**
  * @param $savedCalendar
  * @return Report
  */
 public static function makeReportBySavedCalendar(SavedCalendar $savedCalendar)
 {
     $report = new Report();
     if ($savedCalendar->id > 0) {
         $report->setId((int) $savedCalendar->id);
     }
     $report->setDescription($savedCalendar->description);
     if ($savedCalendar->moduleClassName != null) {
         $report->setModuleClassName($savedCalendar->moduleClassName);
     }
     if ($savedCalendar->name != null) {
         $report->setName($savedCalendar->name);
     }
     $report->setOwner($savedCalendar->owner);
     $report->setType(Report::TYPE_ROWS_AND_COLUMNS);
     $explicitReadWriteModelPermissions = ExplicitReadWriteModelPermissionsUtil::makeBySecurableItem($savedCalendar);
     $report->setExplicitReadWriteModelPermissions($explicitReadWriteModelPermissions);
     if ($savedCalendar->serializedData != null) {
         $unserializedData = unserialize($savedCalendar->serializedData);
         if (isset($unserializedData['filtersStructure'])) {
             $report->setFiltersStructure($unserializedData['filtersStructure']);
         }
         CalendarUtil::makeComponentFormAndPopulateReportFromData($unserializedData[ComponentForReportForm::TYPE_FILTERS], $report, 'Filter');
     }
     return $report;
 }
開發者ID:maruthisivaprasad,項目名稱:zurmo,代碼行數:30,代碼來源:SavedCalendarToReportAdapter.php

示例2: makeReportBySavedReport

 /**
  * @param $savedReport
  * @return Report
  */
 public static function makeReportBySavedReport($savedReport)
 {
     $report = new Report();
     if ($savedReport->id > 0) {
         $report->setId((int) $savedReport->id);
     }
     $report->setDescription($savedReport->description);
     $report->setModuleClassName($savedReport->moduleClassName);
     $report->setName($savedReport->name);
     $report->setOwner($savedReport->owner);
     $report->setType($savedReport->type);
     $explicitReadWriteModelPermissions = ExplicitReadWriteModelPermissionsUtil::makeBySecurableItem($savedReport);
     $report->setExplicitReadWriteModelPermissions($explicitReadWriteModelPermissions);
     if ($savedReport->serializedData != null) {
         $unserializedData = unserialize($savedReport->serializedData);
         if (isset($unserializedData['filtersStructure'])) {
             $report->setFiltersStructure($unserializedData['filtersStructure']);
         }
         if (isset($unserializedData['currencyConversionType'])) {
             $report->setCurrencyConversionType((int) $unserializedData['currencyConversionType']);
         }
         if (isset($unserializedData['spotConversionCurrencyCode'])) {
             $report->setSpotConversionCurrencyCode($unserializedData['spotConversionCurrencyCode']);
         }
         self::makeComponentFormAndPopulateReportFromData($unserializedData[ComponentForReportForm::TYPE_FILTERS], $report, 'Filter');
         self::makeComponentFormAndPopulateReportFromData($unserializedData[ComponentForReportForm::TYPE_ORDER_BYS], $report, 'OrderBy');
         self::makeComponentFormAndPopulateReportFromData($unserializedData[ComponentForReportForm::TYPE_GROUP_BYS], $report, 'GroupBy');
         self::makeComponentFormAndPopulateReportFromData($unserializedData[ComponentForReportForm::TYPE_DISPLAY_ATTRIBUTES], $report, 'DisplayAttribute');
         self::makeComponentFormAndPopulateReportFromData($unserializedData[ComponentForReportForm::TYPE_DRILL_DOWN_DISPLAY_ATTRIBUTES], $report, 'DrillDownDisplayAttribute');
         if (isset($unserializedData['chart'])) {
             $moduleClassName = $report->getModuleClassName();
             $modelClassName = $moduleClassName::getPrimaryModelName();
             $adapter = ModelRelationsAndAttributesToSummationReportAdapter::make($moduleClassName, $modelClassName, $report->getType());
             $chart = new ChartForReportForm(ReportUtil::makeDataAndLabelsForSeriesOrRange($adapter->getAttributesForChartSeries($report->getGroupBys(), $report->getDisplayAttributes())), ReportUtil::makeDataAndLabelsForSeriesOrRange($adapter->getAttributesForChartRange($report->getDisplayAttributes())));
             $chart->setAttributes($unserializedData['chart']);
             $report->setChart($chart);
         }
     }
     return $report;
 }
開發者ID:maruthisivaprasad,項目名稱:zurmo,代碼行數:44,代碼來源:SavedReportToReportAdapter.php

示例3: create

 public function create(Report &$report)
 {
     $this->db->query("insert into Report set\n      \tprocessedOn='" . $this->db->escape(date('Y-m-d H:i:s', $report->getProcessedOn())) . "',\n        receivedOn='" . $this->db->escape(date('Y-m-d H:i:s', $report->getReceivedOn())) . "',\n        throughProxy=" . $this->db->escape($report->getThroughProxy()) . ",\n        proxyHostname='" . $this->db->escape($report->getProxyHostname()) . "',\n        numOfInstalledPkgs=" . $this->db->escape($report->getNumOfInstalledPkgs()) . ",\n        numOfVulnerablePkgsSec=" . $this->db->escape($report->getNumOfVulnerablePkgsSec()) . ",\n        numOfVulnerablePkgsNorm=" . $this->db->escape($report->getNumOfVulnerablePkgsNorm()) . ",\n        numOfCves=" . $this->db->escape($report->getNumOfCves()));
     # Set the newly assigned id
     $report->setId($this->db->getLastInsertedId());
 }
開發者ID:basvandervlies,項目名稱:pakiti3,代碼行數:6,代碼來源:ReportDao.php

示例4: getReport

 public function getReport($selectResult)
 {
     $report = new Report();
     while ($list = mysqli_fetch_assoc($selectResult)) {
         $report->setId($list['rep_report_id']);
         $report->setReason($list['rep_reason']);
         $report->setEntityForReport($list['rep_entity_for_report']);
         $report->setEntityId($list['rep_entity_id']);
         $report->setReportedBy($list['rep_reported_by']);
         $report->setReportedOn($list['rep_reported_on']);
     }
     return $report;
 }
開發者ID:kevin000,項目名稱:Tarboz,代碼行數:13,代碼來源:ReportDataAccessor.php


注:本文中的Report::setId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。