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


PHP Driver::update方法代碼示例

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


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

示例1: update

 private function update($tabla)
 {
     switch ($tabla) {
         case 'Service':
             $service = Service::update($service_id, array('driver_id' => $driver_id, 'status_id' => "2", 'car_id' => $driver_tmp->car_id));
             $this->servicio = Service::find($this->servicio_id);
             $this->validar($service);
             break;
         case 'Driver':
             $driver = Driver::update($this->driver_id, array("available" => "0"));
             $this->conductor = Driver::find($this->conductor_id);
             $this->validar($driver);
             break;
     }
 }
開發者ID:hammer92,項目名稱:Gravility.local,代碼行數:15,代碼來源:CodingController.php

示例2: date

require_once '../../../framework/Driver.php';
if (isset($_GET['action'])) {
    $action = $_GET['action'];
} else {
    $action = "";
}
switch ($action) {
    case "add":
        $name = $_POST['name'];
        $phone = $_POST['phone'];
        $address = $_POST['address'];
        $date = $_POST['date_join'];
        $dateJoin = date("Y-m-d", strtotime($date));
        $description = $_POST['description'];
        if (Driver::add($name, $phone, $address, $description, $dateJoin)) {
            header('Location:index.php');
        }
        break;
    case "update":
        $id = $_POST['id'];
        $phone = $_POST['phone'];
        $address = $_POST['address'];
        $description = $_POST['description'];
        $mDriver = new Driver($id);
        if ($mDriver->update($phone, $address, $description)) {
            header('Location: ' . $_SERVER['HTTP_REFERER']);
        } else {
            header('Location:index.php');
        }
        break;
}
開發者ID:rusty1909,項目名稱:Navigator,代碼行數:31,代碼來源:DriverActionHelper.php

示例3: catch

        Flight::ok($object);
    } catch (Exception $exception) {
        Flight::error($exception);
    }
});
Flight::route('POST /v1/main/driver', function () {
    try {
        $object = Driver::insert();
        Flight::ok($object);
    } catch (Exception $exception) {
        Flight::error($exception);
    }
});
Flight::route('PUT /v1/main/driver/@id', function ($id) {
    try {
        $object = Driver::update($id);
        Flight::ok($object);
    } catch (Exception $exception) {
        Flight::error($exception);
    }
});
Flight::route('DELETE /v1/main/driver/@id', function ($id) {
    try {
        $object = Driver::delete($id);
        Flight::ok($object);
    } catch (Exception $exception) {
        Flight::error($exception);
    }
});
//=============================================================================
//Field
開發者ID:rhalf,項目名稱:app_track,代碼行數:31,代碼來源:main.php


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