本文整理匯總了PHP中Lock::searchBySerial方法的典型用法代碼示例。如果您正苦於以下問題:PHP Lock::searchBySerial方法的具體用法?PHP Lock::searchBySerial怎麽用?PHP Lock::searchBySerial使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Lock
的用法示例。
在下文中一共展示了Lock::searchBySerial方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
<thead>
<tr>
<th>#</th>
<th>Selection</th>
<th>Serial</th>
<th>Address</th>
<th>Start Date-Hour</th>
<th>End Date-Hour</th>
</tr>
</thead>
<tbody id='permissions'>
<?php
$permissionsLocks = Permission::searchByRecipient($_SESSION['identification']);
$counter = 1;
foreach ($permissionsLocks as $permission) {
$lock = Lock::searchBySerial($permission->lockSerial());
$row = "<tr>" . "<td>" . $counter++ . "</td>" . "<td><input type='radio' name='permissions' onchange='showCodes(selectPermission())' value='" . $permission->id() . "'></td>" . "<td>" . $lock->serial() . "</td>" . "<td>" . $lock->address() . "</td>" . "<td>" . $permission->startDateHour() . "</td>" . "<td>" . $permission->endDateHour() . "</td>" . "</tr>";
echo $row;
}
?>
</tbody>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<div class="section">
<div class="container">
<div class="row">
<div class="col-md-12">
示例2: myLock
public function myLock()
{
return Lock::searchBySerial($this->lockSerial);
}