Class Horde_Core_Share_Driver
Horde specific wrapper for Horde_Share drivers. Adds Horde hook calls etc...
Copyright 2002-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you did
not receive this file, see http://opensource.org/licenses/lgpl-2.1.php
Methods summary
public
|
|
public
mixed
|
#
__call( string $method, array $args )
Delegate method calls to the composed share object.
Delegate method calls to the composed share object.
Parameters
- $method
- The method name
- $args
- The method arguments
Returns
mixed The result of the method call
|
public
mixed
|
#
lock( Horde_Lock $locks, Horde_Share_Object $uid = null )
Lock an item belonging to a share, or an entire share itself.
Lock an item belonging to a share, or an entire share itself.
Parameters
- $locks
- The lock object
- $uid
- $share The share object
Returns
mixed A lock ID on sucess, false if:
- The share is already locked,
- The item is already locked,
- A share lock was requested and an item is already
locked in the share.
|
public
boolean
|
#
unlock( Horde_Lock $locks, string $lockid )
Removes the lock for a lock ID.
Removes the lock for a lock ID.
Parameters
- $locks
- The lock object
- $lockid
- <p>The lock ID as generated by a previous call
to lock().</p>
Returns
boolean
|
public
array
|
#
checkLocks( Horde_Lock $locks, string $item_uid = null )
Checks for existing locks.
Checks for existing locks.
First this checks for share locks and if none exists, checks for item
locks (if item_uid defined). It will return the first lock found.
Parameters
- $locks
- The lock object.
- $item_uid
- A uid of an item from this share.
Returns
array Hash with the found lock information in 'lock' and the
lock type ('share' or 'item') in 'type', or an empty
array if there are no locks.
|
public
array
|
#
shareListCallback( string $userid, array $shares, array $params = array() )
share_list callback
Parameters
- $userid
- The userid listShares was called with
- $shares
- The result of the listShares() call
- $params
- The params that listShares() was called with
Returns
array An array of share objects
|
public
|
#
shareAddCallback( Horde_Share_Object $share )
Adds the share_add hook before delegating to the share object.
Adds the share_add hook before delegating to the share object.
Parameters
- $share
- share object being added
|
public
|
#
shareRemoveCallback( Horde_Share_Object $share )
Calls the share_remove hook before delegating to the share object.
Calls the share_remove hook before delegating to the share object.
See
Horde_Share_Base::removeShare()
|
public
|
|