当前位置: 首页>>代码示例>>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;未经允许,请勿转载。