本文整理汇总了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');
}