コード例 #1
0
 /**
  * @brief Saves reports as `PerformanceMetric` in the database.
  *
  * @uses PerformanceAuditManager::Save()
  * @see XHProfPerformanceAuditor->generateReport()
  *
  * @return {Null}
  *
  * @author <*****@*****.**>
  * @date 02/19/2014
  */
 public function save($report = null)
 {
     if (is_array($report)) {
         $report = array_merge($report, array("source" => self::ID, "realm" => self::REALM));
         PerformanceAuditManager::Save($report);
         return $report;
     } else {
         foreach ($this->_reports as $report) {
             $report = array_merge($report, array("source" => self::ID, "realm" => self::REALM));
             PerformanceAuditManager::Save($report);
         }
         return $this->_reports;
     }
 }