Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcWebdavLockAuthorizer

Webdav::ezcWebdavLockAuthorizer

Interface ezcWebdavLockAuthorizer

Interface to be implemented by authorization classes for the lock plugin.

The lock plugin requires an authorization and authentication object to be used in the server, which implements this interface.

Source for this file: /Webdav/src/plugins/lock/interfaces/lock_authorizer.php

ezcWebdavAuthorizer
   |
   --ezcWebdavLockAuthorizer
Version:   //autogen//

Inherited Constants

From ezcWebdavAuthorizer:
ezcWebdavAuthorizer::ACCESS_READ    User desires read access.
ezcWebdavAuthorizer::ACCESS_WRITE    User desires write access.

Method Summary

public void assignLock( $user , $lockToken )
Assign a $lockToken to a given $user.
public bool ownsLock( $user , $lockToken )
Returns if the given $lockToken is owned by the given $user.
public void releaseLock( $user , $lockToken )
Removes the assignement of $lockToken from $user.

Inherited Methods

From ezcWebdavAuthorizer
public bool ezcWebdavAuthorizer::authorize()
Checks authorization of the given $user to a given $path.

Methods

assignLock

void assignLock( string $user , string $lockToken )

Assign a $lockToken to a given $user.

The authorization backend needs to save an arbitrary number of lock tokens per user. A lock token is a of maximum length 255 containing:

  • characters
  • numbers
  • dashes (-)
Parameters:
Name Type Description
$user string
$lockToken string

ownsLock

bool ownsLock( string $user , string $lockToken )

Returns if the given $lockToken is owned by the given $user.

Returns true, if the $lockToken is owned by $user, false otherwise.

Parameters:
Name Type Description
$user string
$lockToken string

releaseLock

void releaseLock( string $user , string $lockToken )

Removes the assignement of $lockToken from $user.

After a $lockToken has been released from the $user, the ownsLock() method must return false for the given combination. It might happen, that a lock is to be released, which already has been removed. This case must be ignored by the method.

Parameters:
Name Type Description
$user string
$lockToken string
Documentation generated by phpDocumentor 1.4.3