您的位置:寻梦网首页编程乐园PHP 编程PHP5中文手册
PHP5中文手册

hw_api->lock

(No version information available, might be only in CVS)

hw_api->lock — Locks an object

说明

hw_api
bool lock ( array $parameter )

Locks an object for exclusive editing by the user calling this function. The object can be only unlocked by this user or the system user.

参数

parameter

The parameter array contains the required element 'objectIdentifier' and the optional parameters 'mode' and 'objectquery'.

'mode' determines how an object is locked. HW_API_LOCK_NORMAL means, an object is locked until it is unlocked. HW_API_LOCK_RECURSIVE is only valid for collection and locks all objects within the collection and possible subcollections. HW_API_LOCK_SESSION means, an object is locked only as long as the session is valid.

返回值

如果成功则返回 TRUE,失败则返回 FALSE