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