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


PHP MY_Controller::returnData方法代碼示例

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


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

示例1: getDashboardDetail

 public function getDashboardDetail()
 {
     $userInfo = $this->User_model->getUserDetail($this->userID);
     if ($userInfo->result->user_type == 'operator') {
         $taxis = $this->taxi_model->getAllTaxi($this->userID);
         foreach ($taxis->result as $taxi) {
             $last = $this->roster_model->getLatestEntryForTaxi($taxi->ID);
             if (count($last->result) > 0) {
                 $current_date = strtotime(date("Y-M-d"));
                 for ($i = 0; $i < 366; $i++) {
                     if ($current_date + $i * 86400 > intval(reset($last->result)->paying_date)) {
                         $this->roster_model->addRosterTemplate($this->userID, $taxi->ID, 'Evening', $current_date + $i * 86400);
                         $this->roster_model->addRosterTemplate($this->userID, $taxi->ID, 'Morning', $current_date + $i * 86400);
                     }
                 }
             } else {
                 $current_date = strtotime(date("Y-M-d"));
                 for ($i = 0; $i < 366; $i++) {
                     $this->roster_model->addRosterTemplate($this->userID, $taxi->ID, 'Evening', $current_date + $i * 86400);
                     $this->roster_model->addRosterTemplate($this->userID, $taxi->ID, 'Morning', $current_date + $i * 86400);
                 }
             }
         }
     }
     $args = $this->uri->uri_to_assoc(3);
     $type = "";
     if (count($args) > 0 && $args['type'] != "") {
         $type = $args['type'];
     }
     parent::returnData($this->Dashboard_model->getDashboardDetail($this->userID, $type));
 }
開發者ID:nignjatov,項目名稱:TaxiDev,代碼行數:31,代碼來源:Dashboard.php

示例2: getAllRosterDetailWithDateRange

 public function getAllRosterDetailWithDateRange()
 {
     $allTaxi = $this->taxi_model->getAllTaxi($this->userID);
     $start_date = $this->input->get('rosterStart');
     $start_date = !empty($start_date) ? $this->timezone->convertDateToMKTime($start_date) : '';
     $end_date = $this->input->get('rosterEnd');
     $end_date = !empty($end_date) ? $this->timezone->convertDateToMKTime($end_date) : '';
     if (empty($allTaxi)) {
         parent::returnData(array());
     } else {
         parent::returnData($this->Roster_model->getAllRosterWithDateRange($this->userID, $allTaxi, $start_date, $end_date));
     }
 }
開發者ID:nignjatov,項目名稱:TaxiDev,代碼行數:13,代碼來源:Roster.php

示例3: getAllDriverAdsDetail

 public function getAllDriverAdsDetail()
 {
     parent::returnData($this->generaladsdriverwanted_model->getAllDriverAds($this->userID));
 }
開發者ID:nignjatov,項目名稱:TaxiDev,代碼行數:4,代碼來源:GeneralAdsDriverWanted.php

示例4: removeTaxi

 public function removeTaxi()
 {
     $taxi_id = $this->input->get('taxi_id');
     parent::returnData($this->Taxi_model->removeTaxi($this->userID, $taxi_id));
 }
開發者ID:nignjatov,項目名稱:TaxiDev,代碼行數:5,代碼來源:Taxi.php

示例5: getAllDriverAdsDetail

 public function getAllDriverAdsDetail()
 {
     $userInfo = $this->User_model->getUserDetail($this->userID);
     parent::returnData($this->Driverads_model->getAllDriverAds($this->userID, $userInfo->result->user_type));
 }
開發者ID:nignjatov,項目名稱:TaxiDev,代碼行數:5,代碼來源:Driverads.php

示例6: getAllAdsDetail

 public function getAllAdsDetail()
 {
     parent::returnData($this->Ads_model->getAllAds($this->userID));
 }
開發者ID:nignjatov,項目名稱:TaxiDev,代碼行數:4,代碼來源:Ads.php

示例7: getAllJournalDetailWithDateRange

 public function getAllJournalDetailWithDateRange()
 {
     parent::returnData($this->Journal_model->getAllJournalWithDateRange($this->userID));
 }
開發者ID:nignjatov,項目名稱:TaxiDev,代碼行數:4,代碼來源:Journal.php


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