Sets a lock on the requested principal and returns the generated lock
ID. NOTE: No security checks are done in the Horde_Lock API. It is
expected that the calling application has done all necessary security
checks before requesting a lock be granted.
abstract public setLock ( string $requestor, string $scope, string $principal, integer $lifetime = 1, $exclusive = Horde_Lock::TYPE_SHARED ) : mixed | ||
$requestor | string | User ID of the lock requestor. |
$scope | string | The scope of the lock. Typically the name of the application requesting the lock or some other identifier used to group locks together. |
$principal | string | A principal on which a lock should be granted. The format can be any string but is suggested to be in URI form. |
$lifetime | integer | Time (in seconds) for which the lock will be considered valid. |
Résultat | mixed | A string lock ID. |