本文整理汇总了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));
}
示例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));
}
}
示例3: getAllDriverAdsDetail
public function getAllDriverAdsDetail()
{
parent::returnData($this->generaladsdriverwanted_model->getAllDriverAds($this->userID));
}
示例4: removeTaxi
public function removeTaxi()
{
$taxi_id = $this->input->get('taxi_id');
parent::returnData($this->Taxi_model->removeTaxi($this->userID, $taxi_id));
}
示例5: getAllDriverAdsDetail
public function getAllDriverAdsDetail()
{
$userInfo = $this->User_model->getUserDetail($this->userID);
parent::returnData($this->Driverads_model->getAllDriverAds($this->userID, $userInfo->result->user_type));
}
示例6: getAllAdsDetail
public function getAllAdsDetail()
{
parent::returnData($this->Ads_model->getAllAds($this->userID));
}
示例7: getAllJournalDetailWithDateRange
public function getAllJournalDetailWithDateRange()
{
parent::returnData($this->Journal_model->getAllJournalWithDateRange($this->userID));
}