本文整理匯總了PHP中Lock::get_locking_user方法的典型用法代碼示例。如果您正苦於以下問題:PHP Lock::get_locking_user方法的具體用法?PHP Lock::get_locking_user怎麽用?PHP Lock::get_locking_user使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Lock
的用法示例。
在下文中一共展示了Lock::get_locking_user方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: remove_Kbit_from_delivery
public static function remove_Kbit_from_delivery($Kbit_UID, $Delivery_UID, $link_type, $user)
{
if (Lock::is_locked_by_user($Delivery_UID, 'DELIVERY_BASE', $user) == false) {
debugLog::log("<i>[delivery.php:remove_term_from_Delivery]</i> Delivery (" . $Delivery_UID . ") is not locked by the user (" . $user . ")");
return null;
}
$locking_user = Lock::get_locking_user($UID, 'KBIT_BASE');
if ($locking_user != null && $locking_user["UID"] != $user) {
debugLog::log("<i>[delivery.php:add_Kbit_to_delivery]</i> Kbit(" . $Kbit_UID . ") is locked by other user(" . $locking_user["UID"] . ")");
return null;
}
return D2KRelation::remove_D2K_relation($Kbit_UID, $Delivery_UID, $link_type, 'user');
}
示例2: remove_K2K_relation
public static function remove_K2K_relation($first_UID, $second_UID)
{
// check if Kbits is locked by user
if (Lock::is_locked_by_user($first_UID, 'KBIT_BASE', $user) == false && Lock::is_locked_by_user($second_UID, 'KBIT_BASE', $user) == false) {
debugLog::log("<i>[Kbits.php:add_K2K_relation]</i> Non of the Kbits (" . $first_UID . ", " . $second_UID . ") are locked by user (" . $user . ")");
return null;
}
// check soft lock
$locking_user = Lock::get_locking_user($first_UID, 'KBIT_BASE');
if ($locking_user != null && $locking_user["UID"] != $user) {
debugLog::log("<i>[Kbits.php:add_K2K_relation]</i> one of the Kbits (" . $first_UID . ") is locked by other user(" . $locking_user["UID"] . ")");
return null;
}
$locking_user = Lock::get_locking_user($second_UID, 'KBIT_BASE');
if ($locking_user != null && $locking_user["UID"] != $user) {
debugLog::log("<i>[Kbits.php:add_K2K_relation]</i> one of the Kbits (" . $first_UID . ") is locked by other user(" . $locking_user["UID"] . ")");
return null;
}
refRelation::remove_relation($first_UID, $second_UID, 'R_LK2K', 'user');
}