protected function _lock($object, $lock)
    {
        if ($lock) {
            self::$_locks[$object->getHandle()] = true;
        } else {
            unset(self::$_locks[$object->getHandle()]);
        }
    }
protected function _lock($object, $lock)
    {
        if ($lock) {
            self::$_locks[$object->getHandle()] = true;
        } else {
            unset(self::$_locks[$object->getHandle()]);
        }
    }
protected function _lock ( $ object , $ lock ) { if ( $ lock ) { self :: $ _locks [ $ object -> getHandle ( ) ] = true ; } else { unset ( self :: $ _locks [ $ object -> getHandle ( ) ] ) ; } }
Set a lock for a repository.

@param AnObject $object
@param bool    $lock
Set a lock for a repository .