• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Report类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Report的典型用法代码示例。如果您正苦于以下问题:PHP Report类的具体用法?PHP Report怎么用?PHP Report使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Report类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: handleReport

 public function handleReport($request)
 {
     if (!empty($request['id'])) {
         $report = new Report();
         $report->Load("id = ?", array($request['id']));
         if ($report->id . "" == $request['id']) {
             if ($report->type == 'Query') {
                 $where = $this->buildQueryOmmit(json_decode($report->paramOrder, true), $request);
                 $query = str_replace("_where_", $where[0], $report->query);
                 return $this->executeReport($report, $query, $where[1]);
             } else {
                 if ($report->type == 'Class') {
                     $className = $report->query;
                     include MODULE_PATH . '/reportClasses/ReportBuilder.php';
                     include MODULE_PATH . '/reportClasses/' . $className . ".php";
                     $cls = new $className();
                     $data = $cls->getData($report, $request);
                     return $this->generateReport($report, $data);
                 }
             }
         } else {
             return array("ERROR", "Report id not found");
         }
     }
 }
开发者ID:riazuddinahmed1,项目名称:icehrm-1,代码行数:25,代码来源:ReportHandler.php


示例2: display

 /**
  * Displays the dashlet
  * 
  * @return string html to display dashlet
  */
 function display()
 {
     require_once "modules/Reports/Report.php";
     //		ini_set('display_errors', 'false');
     $chartReport = new SavedReport();
     $chartExists = $chartReport->retrieve($this->report_id, false);
     if (!is_null($chartExists)) {
         $this->title = $chartReport->name;
         $reporter = new Report($chartReport->content);
         $reporter->is_saved_report = true;
         $reporter->saved_report_id = $chartReport->id;
         $reporter->get_total_header_row();
         $reporter->run_chart_queries();
         require_once "modules/Reports/templates/templates_chart.php";
         ob_start();
         template_chart($reporter, true, true, $this->id);
         $str = ob_get_contents();
         ob_end_clean();
         $xmlFile = get_cache_file_name($reporter);
         $html = parent::display() . "<div align='center'>" . $str . "</div>" . "<br />";
         // return parent::display for title and such
         $ss = new Sugar_Smarty();
         $ss->assign('chartName', $this->id);
         $ss->assign('chartXMLFile', $xmlFile);
         $script = $ss->fetch('modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl');
         $json = getJSONobj();
         return parent::display() . "<div align='center'>" . $str . "</div>" . "<br />";
         // return parent::display for title and such
     }
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:35,代码来源:ChartsDashlet.php


示例3: index

 public function index()
 {
     if (!$this->wg->User->isAllowed('customreports')) {
         $this->displayRestrictionError();
         return false;
         // skip rendering
     }
     $this->response->addAsset('extensions/wikia/CustomReports/css/CustomReports.scss');
     $code = $this->getVal('report', null);
     $days = $this->getVal('days', null);
     $this->charts = '';
     $this->report = $code;
     $this->days = $days;
     $this->action = $this->getTitle()->escapeLocalUrl();
     if (!is_null($code)) {
         $report = new Report($code, $days);
         $data = $report->get_data();
         foreach ($data as $key => $data_xml) {
             $this->charts .= (string) $this->app->sendRequest('CustomReportsSpecial', 'getChart', array('data_xml' => $data_xml, 'num_chart' => $key));
         }
         if (empty($this->charts)) {
             $this->charts = $this->wf->Msg('report-no-data');
         }
     }
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:25,代码来源:CustomReportsSpecialController.class.php


示例4: action_run

 protected function action_run()
 {
     $stmt = $this->db->query('select * from query
   where query_id = :query_id', array('query_id' => $_POST['query_id']));
     if ($row = $stmt->fetch()) {
         if (stripos($row['query'], 'file ') === 0) {
             $this->transfer(substr($row['query'], 5), array('dest' => $_POST['dest']));
         } else {
             $stmt2 = $this->db->query($row['query']);
             $r = new Report();
             if ($_POST['dest'] == 'screen') {
                 $r->html($row['title'], $stmt2);
             } else {
                 if ($_POST['dest'] == 'pdf') {
                     $r->pdf($row['title'], $stmt2);
                 } else {
                     if ($_POST['dest'] == 'csv') {
                         $r->csv($stmt2);
                     }
                 }
             }
         }
     } else {
         $this->message('Query not found');
     }
 }
开发者ID:raynaldmo,项目名称:php-education,代码行数:26,代码来源:reports.php


示例5: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $imageurl = '';
     if (Request::get('image') != '') {
         $imageurl = "/images/report/accident_" . time() . ".jpg";
         $base = Request::get('image');
         $binary = base64_decode($base);
         $ifp = fopen($imageurl, "wb");
         fwrite($ifp, $binary);
         fclose($ifp);
         $imageurl = 'http://125.62.200.54/traffic/' . $imageurl;
     }
     $accident = Accident::create(array('user' => Request::get('user'), 'latitude' => Request::get('lat'), 'longitude' => Request::get('lng'), 'time' => date('g:i A', time()), 'date' => date('M j', time()), 'details' => Request::get('details'), 'image_url' => $imageurl));
     $report = new Report();
     $report->traffic_jam_id = $accident->id;
     $report->user = Request::get('user');
     $report->latitude = Request::get('lat');
     $report->longitude = Request::get('lng');
     $report->time = date('g:i A', time());
     $report->date = date('M j', time());
     $report->description = "There has been an accident. " . Request::get('details');
     $report->image_url = $imageurl;
     $report->type = 'Accident';
     $report->title = RestApi::getaddress(Request::get('lat'), Request::get('lng'));
     $report->save();
     //RestApi::sendNotification()
     return Response::json(array('error' => false), 200);
 }
开发者ID:vishnu-b,项目名称:traffic_minimal,代码行数:33,代码来源:AccidentController.php


示例6: generateAdmin

 function generateAdmin()
 {
     require_once CORE_DIR . "/admin/report.php";
     $getReport = new Report();
     $boardTitle = SHOWTITLETXT > 0 ? "<div class='boardTitle'>" . $this->info['page']['title'] . "</div><div class='boardSubtitle'>" . S_HEADSUB . "</div><hr>" : '';
     $bannerImg .= SHOWTITLEIMG ? '<img class="bannerImg" src="' . TITLEIMG . '" onclick="this.src=this.src;" alt="' . TITLE . '" /><br>' : '';
     /* begin page content */
     $dat = "<!DOCTYPE html><head>\n                    <meta name='description' content='" . S_DESCR . "'/></meta>\n                    <meta http-equiv='content-type'  content='text/html;charset=utf-8' /></meta>\n                    <meta name='viewport' content='width=device-width, initial-scale=1'></meta>\n                    <meta http-equiv='cache-control' content='max-age=0' />\n                    <meta http-equiv='cache-control' content='no-cache' />\n                    <meta http-equiv='expires' content='0' />\n                    <meta http-equiv='expires' content='Tue, 01 Jan 1980 1:00:00 GMT' />\n                    <meta http-equiv='pragma' content='no-cache' />\n                    <link rel='shortcut icon' href='" . CSS_PATH . "imgs/favicon.ico'>\n                    <title>" . $this->info['page']['title'] . "</title>";
     //$dat .= "<link class='togglesheet' rel='stylesheet' type='text/css' href='" . CSS_PATH . "/panel.css' title='Admin Panel' />";
     if (NSFW) {
         $dat .= "<link class='togglesheet' rel='stylesheet' type='text/css' href='" . CSS_PATH . CSS1 . "' title='Yotsuba' />\n                <link rel='stylesheet' type='text/css' href='" . CSS_PATH . "/stylesheets/mobile.css' title='mobile' />\n                <link class='togglesheet' rel='alternate stylesheet' type='text/css' media='screen'  href='" . CSS_PATH . CSS2 . "' title='Yotsuba B' />";
     } else {
         $dat .= "<link class='togglesheet' rel='stylesheet' type='text/css' media='screen'  href='" . CSS_PATH . CSS2 . "' title='Yotsuba B' />\n            <link rel='stylesheet' type='text/css' href='" . CSS_PATH . "/stylesheets/mobile.css' title='mobile' />\n            <link class='togglesheet' rel='alternate stylesheet' type='text/css' href='" . CSS_PATH . CSS1 . "' title='Yotsuba' />";
     }
     //<link class='togglesheet' rel='alternate stylesheet' type='text/css' media='screen'  href='" . CSS_PATH . CSS4 . "' title='Burichan'/> RIP Burichan 1862-2015
     $dat .= "<link class='togglesheet' rel='alternate stylesheet' type='text/css' media='screen'  href='" . CSS_PATH . CSS3 . "' title='Tomorrow' />";
     $dat .= "<script src='" . JS_PATH . "/extension.min.js' type='text/javascript'></script>\n                <script src='" . JS_PATH . "/main.js' type='text/javascript'></script>";
     $dat .= '</head><div class="beforePostform" />' . $titlebar . '
             <span class="boardList desktop">' . (file_exists(BOARDLIST) ? file_get_contents(BOARDLIST) : '') . '</div>
             <div class="linkBar">[<a href="' . HOME . '" target="_top">' . S_HOME . '</a>][<a href="' . PHP_ASELF_ABS . '">' . S_ADMIN . '</a>]
             </span><div class="boardBanner">' . $bannerImg . $boardTitle . '</div>';
     $dat .= "<div class='panelOps' style='text-align:left;' />[<a href=\"" . PHP_SELF2 . "\">" . S_RETURNS . "</a>]";
     $dat .= "[<a href=\"" . PHP_SELF . "\">" . S_LOGUPD . "</a>]";
     if (valid('moderator')) {
         $dat .= "[<a href='" . PHP_ASELF_ABS . "?mode=rebuild' >Пересобрать</a>]";
         $dat .= "[<a href='" . PHP_ASELF_ABS . "?mode=rebuildall' >Пересобрать все треды</a>]";
         $dat .= "[<a href='" . PHP_ASELF_ABS . "?mode=reports' >" . $getReport->reportGetAllBoard() . "</a>]";
     }
     if (valid('admin')) {
         $dat .= "[<a href='" . PHP_ASELF_ABS . "?mode=staff' >Управление пользователями</a>]";
     }
     $dat .= "[<a href='" . PHP_ASELF . "?mode=logout'>" . S_LOGOUT . "</a>]";
     return $dat;
 }
开发者ID:ru4chan,项目名称:yotsubato,代码行数:34,代码来源:head.php


示例7: __invoke

 /**
  * @param $params
  * @return Report
  */
 public function __invoke($params)
 {
     $deliveryMonitoringService = $this->getServiceLocator()->get(DeliveryMonitoringService::CONFIG_ID);
     $deliveryClass = new \core_kernel_classes_Class('http://www.tao.lu/Ontologies/TAODelivery.rdf#AssembledDelivery');
     $deliveries = $deliveryClass->getInstances(true);
     $deliveryExecutionService = \taoDelivery_models_classes_execution_ServiceProxy::singleton();
     $this->report = new Report(Report::TYPE_INFO, 'Updating of delivery monitoring cache...');
     foreach ($deliveries as $delivery) {
         if ($delivery->exists()) {
             $deliveryExecutions = $deliveryExecutionService->getExecutionsByDelivery($delivery);
             foreach ($deliveryExecutions as $deliveryExecution) {
                 $data = $deliveryMonitoringService->getData($deliveryExecution, true);
                 if ($deliveryMonitoringService->save($data)) {
                     $this->report->add(new Report(Report::TYPE_SUCCESS, "Delivery execution {$deliveryExecution->getUri()} successfully updated."));
                 } else {
                     $errors = $data->getErrors();
                     $errorsStr = "    " . PHP_EOL;
                     array_walk($errors, function ($val, $key) use(&$errorsStr) {
                         $errorsStr .= "    {$key} - {$val}" . PHP_EOL;
                     });
                     $this->report->add(new Report(Report::TYPE_ERROR, "Delivery execution {$deliveryExecution->getUri()} was not updated. {$errorsStr}"));
                 }
             }
         }
     }
     return $this->report;
 }
开发者ID:oat-sa,项目名称:extension-tao-proctoring,代码行数:31,代码来源:UpdateMonitoringCache.php


示例8: testReportConfigInConstructor

 public function testReportConfigInConstructor()
 {
     $report = new Report('', '', '', ['size' => 10]);
     $this->assertEquals(['size' => 10], $report->getConfig());
     $report = new Report('', '', '', []);
     $this->assertEquals([], $report->getConfig());
 }
开发者ID:fireguard,项目名称:report,代码行数:7,代码来源:ReportTest.php


示例9: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $imageurl = '';
     if (Request::get('image') != '') {
         $imageurl = "public/images/report/trafficjam_" . time() . ".jpg";
         $base = Request::get('image');
         $binary = base64_decode($base);
         $ifp = fopen($imageurl, "wb");
         fwrite($ifp, $binary);
         fclose($ifp);
         $imageurl = 'http://125.62.200.54/traffic/' . $imageurl;
     }
     $roadblock = RoadBlock::create(array('user' => Request::get('user'), 'latitude' => Request::get('lat'), 'longitude' => Request::get('lng'), 'time' => date('g:iA', time()), 'date' => date('M j', time()), 'status' => Request::get('status'), 'reason' => Request::get('reason'), 'image_url' => $imageurl));
     $report = new Report();
     $report->user = Request::get('user');
     $report->latitude = Request::get('lat');
     $report->longitude = Request::get('lng');
     $report->time = date('g:i A', time());
     $report->date = date('M j', time());
     $report->description = "The road is blocked at " . RestApi::getaddress(Request::get('lat'), Request::get('lng')) . " due to " . Request::get('reason');
     $report->image_url = $imageurl;
     $report->type = 'Road Block';
     $report->title = RestApi::getaddress(Request::get('lat'), Request::get('lng'));
     $report->save();
     return RestApi::sendNotification('RB', Request::get('lat'), Request::get('lng'), RestApi::getaddress(Request::get('lat'), Request::get('lng')), '12');
 }
开发者ID:vishnu-b,项目名称:traffic_minimal,代码行数:31,代码来源:RoadBlockController.php


示例10: 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


示例11: getReport

  /**
   * Return the Report instance from filters list and data type.
   * 
   * @param mixed $filters array of IFilter used to filter data before adding to Report
   * @param mixed $type data type the report refers to (user, mailshare, group). The equivalent class must be defined to access data (e.g. class User for $type='user').
   * @access public
   * @return void
   */
  public static function getReport($filters, $type='user') {

    if (($type!='mailshare') && ($type!='group')) {
      $type = 'user';
    }

    $report = new Report;
    $obm_q = new DB_OBM;
    $query_builder = 'build_'.$type.'_query';
    $entity_builder = 'build_'.$type.'_entity';

    // query database to get entity data
    $query = ReportFactory::$query_builder($obm_q);
    display_debug_msg($query, $cdg_sql, 'getReport()');
    $obm_q->query($query);
    while ($obm_q->next_record()) {

      // build object from any result row
      $record = ReportFactory::$entity_builder($obm_q);

      // filter the results with filters list
      $included = true;
      foreach($filters as $filter) {
        $included &= $filter->filter($record);
      }
      if ($included) $report->addRecord($record);
    }

    return $report;
  }
开发者ID:Kervinou,项目名称:OBM,代码行数:38,代码来源:reportFactory.php


示例12: perform

 function perform()
 {
     // set display requirements
     $result = array('renderer' => 'template_renderer.inc', 'pageTitle' => SITE_NAME . ' : Add Date Criteria', 'content' => 'content/reportFormDate.php');
     // don't lose the db!
     $db = $_REQUEST['db'];
     // where are we?
     $userFinder = new UserFinder($db);
     $user = $userFinder->findById($_SESSION['userId']);
     $library = $user['library_short_name'];
     $libraryID = $user['library_id'];
     $result['library_id'] = $libraryID;
     $result['library'] = $library;
     $result['user'] = $user;
     $report_id = grwd('report_id');
     $result['report_id'] = $report_id;
     // get all the info on the reports
     $reportFinder = new ReportFinder($db);
     $reportCount = $reportFinder->getReportCount();
     $result['reportCount'] = $reportCount;
     // get the information for the chosen report by requiring Reports.php and all the reports
     $report_class_handle = new Report();
     $report_class_get = $report_class_handle->get();
     // declare the report class by using it's ID
     $report_info = new $report_id();
     $result['reportList'] = $report_info->info();
     $libraryFinder = new LibraryFinder($db);
     $result['libraryList'] = $libraryFinder->getAllLibraries();
     $locationFinder = new LocationFinder($db);
     $result['locationList'] = $locationFinder->getAllLocations();
     return $result;
 }
开发者ID:ncpltechnology,项目名称:libstats,代码行数:32,代码来源:ReportAddDateAction.php


示例13: getSavedReportChartById

 /**
  * Retrieves a saved report and chart data, given a report ID in the args
  *
  * @param $api ServiceBase The API class of the request
  * @param $args array The arguments array passed in from the API
  * @return array
  */
 public function getSavedReportChartById($api, $args)
 {
     require_once "include/SugarCharts/ChartDisplay.php";
     $chartReport = $this->getSavedReportById($args['reportId']);
     if (isset($args['filter_id']) && $args['filter_id'] !== 'all_records') {
         $chartReport->content = $this->updateFilterDef($chartReport->content, $args['filter_id']);
     }
     if (!empty($chartReport)) {
         if (!$chartReport->ACLAccess('view')) {
             throw new SugarApiExceptionNotAuthorized('No access to view this report');
         }
         $returnData = array();
         $this->title = $chartReport->name;
         require_once "modules/Reports/Report.php";
         $reporter = new Report($chartReport->content);
         $reporter->saved_report_id = $chartReport->id;
         if ($reporter && !$reporter->has_summary_columns()) {
             return '';
         }
         // build report data since it isn't a SugarBean
         $reportData = array();
         $reportData['name'] = $reporter->name;
         $reportData['id'] = $reporter->saved_report_id;
         $reportData['summary_columns'] = $reporter->report_def['summary_columns'];
         $reportData['group_defs'] = $reporter->report_def['group_defs'];
         // add reportData to returnData
         $returnData['reportData'] = $reportData;
         $chartDisplay = new ChartDisplay();
         $chartDisplay->setReporter($reporter);
         $chart = $chartDisplay->getSugarChart();
         $json = json_decode($chart->buildJson($chart->generateXML()));
         $returnData['chartData'] = $json;
         return $returnData;
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:42,代码来源:ReportsDashletsApi.php


示例14: testRouterReportCreate

 /**
  * lrs/{id}/reporting/create  
  * 
  * This test case create new reporting and run report
  * 
  * It is ensure reporting work correctly.
  * */
 public function testRouterReportCreate()
 {
     for ($i = 0; $i < 7; $i++) {
         $vs = $this->defaultStatment();
         $this->statements[] = $this->createStatement($vs, $this->lrs);
     }
     $data = array('description' => \app\locker\helpers\Helpers::getRandomValue(), 'name' => '', 'lrs' => $this->lrs->_id, 'query' => array('statement.actor.mbox' => array("mailto:[email protected]"), 'statement.verb.id' => array("http://adlnet.gov/expapi/verbs/experienced")));
     //lrs input validation
     $rules['name'] = 'required|alpha_spaces';
     $rules['description'] = 'alpha_spaces';
     $validator = Validator::make($data, $rules);
     $this->assertTrue($validator->fails());
     $data['name'] = 'reportabcd';
     $data['description'] = 'reportabcd description';
     $validator = Validator::make($data, $rules);
     $this->assertTrue($validator->passes());
     // create report.
     $report = new Report();
     $report->lrs = $data['lrs'];
     $report->query = $data['query'];
     $report->name = $data['name'];
     $report->description = $data['description'];
     $save = $report->save();
     $this->assertTrue($save);
     // Ensure report show in reporting page.
     $crawler = $this->client->request('GET', "/lrs/{$this->lrs->_id}/reporting");
     $this->assertGreaterThan(0, $crawler->filter('html:contains("reportabcd")')->count());
     $this->assertGreaterThan(0, $crawler->filter('html:contains("reportabcd description")')->count());
     $crawler = $this->client->request('GET', "/lrs/{$this->lrs->_id}/reporting/show/{$report->_id}");
     $this->assertGreaterThan(0, $crawler->filter('html:contains("Number of statements")')->count());
     $this->assertGreaterThan(0, $crawler->filter('html:contains("7")')->count());
     // Delete report by router.
     $crawler = $this->client->request('DELETE', "/lrs/{$this->lrs->_id}/reporting/delete/{$report->_id}");
     $this->assertEquals(Report::find($report->_id), NULL);
 }
开发者ID:jesposito,项目名称:learninglocker,代码行数:42,代码来源:ReportTest.php


示例15: store

 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $imageurl = '';
     if (Request::get('image') != '') {
         $imageurl = "/images/report/trafficjam_" . time() . ".jpg";
         $base = Request::get('image');
         $binary = base64_decode($base);
         $ifp = fopen($imageurl, "wb");
         fwrite($ifp, $binary);
         fclose($ifp);
         $imageurl = 'http://125.62.200.54/traffic/' . $imageurl;
     }
     $trafficJam = TrafficJam::create(array('user' => Request::get('user'), 'latitude' => Request::get('lat'), 'longitude' => Request::get('lng'), 'clear_by' => RestApi::clearBy(Request::get('status')), 'time' => date('g:iA', time()), 'date' => date('M j', time()), 'status' => Request::get('status'), 'reason' => Request::get('reason'), 'image_url' => $imageurl));
     $report = new Report();
     $report->traffic_jam_id = $trafficJam->id;
     $report->user = Request::get('user');
     $report->latitude = Request::get('lat');
     $report->longitude = Request::get('lng');
     $report->time = date('g:i A', time());
     $report->date = date('M j', time());
     $report->clear_by = RestApi::clearBy(Request::get('status'));
     $report->description = "There is a " . Request::get('status') . " traffic jam at " . RestApi::getaddress(Request::get('lat'), Request::get('lng')) . " due to " . Request::get('reason');
     $report->image_url = $imageurl;
     $report->type = 'Traffic Jam';
     $report->title = RestApi::getaddress(Request::get('lat'), Request::get('lng'));
     $report->save();
     $values = array(Request::get('lat'), Request::get('lng'), '12');
     return RestApi::sendNotification('TJ', $values);
     /*return Response::json(array(
     			'error' => false),
     			200
     		);
     */
 }
开发者ID:vishnu-b,项目名称:traffic_minimal,代码行数:39,代码来源:TrafficJamController.php


示例16: run

 public function run()
 {
     try {
         // 共通設定取得
         $base_dir = dirname(__FILE__) . '/../';
         $config = new Config($base_dir);
         $debug = $config->get_param('debug');
         // レポート用オブジェクト
         $report = new Report($config);
         // メンバー一覧のオブジェクト
         $member = new Member($config);
         // 担当者マスターの差分を取得する。
         $member->get_diff();
         $this->mail_body .= $member->print_diff();
         // プロジェクト一覧のオブジェクト
         $project = new Project($config);
         // プロジェクトマスターの差分を取得する。
         $project->get_diff();
         $this->mail_body .= $project->print_diff();
         // 担当プロジェクトのオブジェクト
         $relation = new Relation($config);
         // 担当プロジェクトの差分を取得する。
         $relation->set_member($member);
         $relation->set_project($project);
         $relation->get_diff();
         $this->mail_body .= $relation->print_diff();
         // BackLogIDが入力されているにもかかわらず担当者名が未入力のデータを検出する。
         $this->mail_body .= $relation->validate();
         // 複数コンテンツ障害の配信先
         // 全社向け
         $multi_alert = new MultiAlert($config);
         $multi_alert->set_mode('all');
         $multi_alert->set_project($project);
         $multi_alert->set_member($member);
         $multi_alert->get_diff();
         $this->mail_body .= $multi_alert->print_diff();
         // コンテンツ事業部向け
         $multi_alert = new MultiAlert($config);
         $multi_alert->set_mode('contents');
         $multi_alert->set_project($project);
         $multi_alert->set_member($member);
         $multi_alert->get_diff();
         $this->mail_body .= $multi_alert->print_diff();
         // レポート
         $report->out($this->mail_body);
         // 古いファイルを削除
         Util::remove_old_file($config->get_param('data_dir'), $config->get_param('keep_file_days'));
     } catch (Exception $e) {
         $member->remove();
         $project->remove();
         $relation->remove();
         $multi_alert->remove();
         if ($debug) {
             print $e->getMessage() . PHP_EOL;
         } else {
             $report->out($e->getMessage());
         }
     }
 }
开发者ID:cy-daisuke-senmyou,项目名称:SukumeRequestChecker,代码行数:59,代码来源:Main.php


示例17: report

 public function report(Report $report)
 {
     $form = $report->toWebFormat();
     $form['api_user'] = $this->api_user;
     $form['api_key'] = $this->api_key;
     $response = \Unirest::post($report->getUrl(), array(), $form);
     return $response->body;
 }
开发者ID:dejami-jbauer,项目名称:sendgrid-report-php,代码行数:8,代码来源:SendGrid.php


示例18: render_report

 protected static function render_report($report_file, $request)
 {
     $report = new Report($report_file);
     $report->run();
     $locals = array('report' => $report, 'request' => $request);
     $locals['content_for_layout'] = Template::render(VIEWS_TEMPLATE_DIRECTORY . DS . $report->view, $locals);
     return $report->layout ? Template::render(LAYOUTS_TEMPLATE_DIRECTORY . DS . $report->layout, $locals) : $locals['content_for_layout'];
 }
开发者ID:shuber,项目名称:weeports,代码行数:8,代码来源:dispatcher.php


示例19: report

 public function report(Report $report)
 {
     $form = $report->toWebFormat();
     $form['api_user'] = $this->apiUser;
     $form['api_key'] = $this->apiKey;
     $response = $this->postRequest($report->getUrl(), $form);
     return $response->body;
 }
开发者ID:fcosrno,项目名称:sendgrid-report-php,代码行数:8,代码来源:SendGrid.php


示例20: testFilesCanBeAddedToReport

 public function testFilesCanBeAddedToReport()
 {
     $file = $this->getMockBuilder('Helmich\\TypoScriptLint\\Linter\\Report\\File')->disableOriginalConstructor()->getMock();
     $report = new Report();
     $report->addFile($file);
     $this->assertCount(1, $report->getFiles());
     $this->assertSame($file, $report->getFiles()[0]);
 }
开发者ID:hexa2k9,项目名称:typo3-typoscript-lint,代码行数:8,代码来源:ReportTest.php



注:本文中的Report类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Reports类代码示例发布时间:2022-05-23
下一篇:
PHP RepoGroup类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap