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


PHP Vehicle::isDeployed方法代碼示例

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


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

示例1:

			
			<div class="clear"></div> <!-- End .clear -->
			

			<div class="clear"></div>
			
			<div class="content-box" style="margin: 0 0 0 0;padding: 0 0 0 0;border:0px"><!-- Start Content Box -->
				

				
				<div class="content-box-content-map" style="padding:0;width:100%">
					
					
					<div style="display: block; " class="tab-content default-tab" id="map" style="width:100%;height:100%;"> <!-- This is the target div. id must match the href of this div's tab -->
					<?php 
if (!$mVehicle->isDeployed()) {
    echo "<div class='notification information png_bg' style='width:50%;float:left;margin:10px 10px 10px 10px;'><div>Tracking device has been installed yet.</div></div> ";
} else {
    if ($mVehicle->getAddress() == null) {
        echo "<div class='notification attention png_bg' style='width:50%;float:left;margin:10px 10px 10px 10px;'><div>Could not find location at this moment, Please be patient and be with us.</div></div> ";
    } else {
        //echo $mVehicle->getAddress();
        ?>
					<div id="googleMap" style="width:70%;height:100%;float:left;"></div>
					<?php 
    }
}
?>
					<div class="content-box-content-detail" style="width:30%;height:100%;float:right;overflow-y:auto">
					
						<div id="vehicle_number" style="margin:15px 5px 20px 5px">
開發者ID:rustydev19,項目名稱:Navigator,代碼行數:30,代碼來源:detail.php

示例2: Error

 if ($vehicleId == null) {
     $setupResponse->status = "FAILURE";
     $error = new Error();
     $error->reason = "VEHICLE";
     $error->message = "No such vehicle registered.";
     $result->error = $error;
 } else {
     $mVehicle = new Vehicle($vehicleId);
     if ($mVehicle->getType() != $type) {
         $setupResponse->status = "FAILURE";
         $error = new Error();
         $error->reason = "VEHICLE_TYPE";
         $error->message = "Vehicle type does not match";
         $result->error = $error;
     } else {
         if ($mVehicle->isDeployed() == 1) {
             $setupResponse->status = "FAILURE";
             $error = new Error();
             $error->reason = "VEHICLE";
             $error->message = $vehicle . " is already deployed";
             $result->error = $error;
         } else {
             if ($mVehicle->deploy($imei, $mac)) {
                 $setupResponse->status = "SUCCESS";
                 $vehicle = new TempVehicle();
                 $vehicle->id = $mVehicle->getId();
                 $vehicle->number = $mVehicle->getVehicleNumber();
                 $vehicle->type = $mVehicle->getType();
                 $vehicle->year = $mVehicle->getMakeYear();
                 $vehicle->date_added = $mVehicle->getDateAdded();
                 $result->vehicle = $vehicle;
開發者ID:rusty1909,項目名稱:Navigator,代碼行數:31,代碼來源:setup.php


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