PHP Class Horde_Core_Share_Driver, horde

.. Copyright 2002-2016 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
Author: Michael J. Rubinsky ([email protected])
Datei anzeigen Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_share Horde_Share_Base The composed Horde_Share driver
$_storageMap array Maps the concrete share class to the required storage adapter.

Public Methods

Method Description
__call ( string $method, array $args ) : mixed Delegate method calls to the composed share object.
__construct ( Horde_Share_Base $share )
checkLocks ( Horde_Lock $locks, string $item_uid = null ) : array Checks for existing locks.
lock ( Horde_Lock $locks, string $uid = null ) : mixed Lock an item belonging to a share, or an entire share itself.
shareAddCallback ( Horde_Share_Object $share ) Adds the share_add hook before delegating to the share object.
shareListCallback ( string $userid, array $shares, array $params = [] ) : array share_list callback
shareModifyCallback ( Horde_Share_Object $share )
shareRemoveCallback ( Horde_Share_Object $share ) Calls the share_remove hook before delegating to the share object.
unlock ( Horde_Lock $locks, string $lockid ) : boolean Removes the lock for a lock ID.

Method Details

__call() public method

Delegate method calls to the composed share object.
public __call ( string $method, array $args ) : mixed
$method string The method name
$args array The method arguments
return mixed The result of the method call

__construct() public method

public __construct ( Horde_Share_Base $share )
$share Horde_Share_Base

checkLocks() public method

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.
public checkLocks ( Horde_Lock $locks, string $item_uid = null ) : array
$locks Horde_Lock The lock object.
$item_uid string A uid of an item from this share.
return 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.

lock() public method

Lock an item belonging to a share, or an entire share itself.
public lock ( Horde_Lock $locks, string $uid = null ) : mixed
$locks Horde_Lock The lock object.
$uid string The uid of a specific object to lock, if null, entire share is locked.
return 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.

shareAddCallback() public method

Adds the share_add hook before delegating to the share object.
public shareAddCallback ( Horde_Share_Object $share )
$share Horde_Share_Object

shareListCallback() public method

share_list callback
public shareListCallback ( string $userid, array $shares, array $params = [] ) : array
$userid string The userid listShares was called with
$shares array The result of the listShares() call
$params array The params that listShares() was called with
return array An array of share objects

shareModifyCallback() public method

public shareModifyCallback ( Horde_Share_Object $share )
$share Horde_Share_Object

shareRemoveCallback() public method

Calls the share_remove hook before delegating to the share object.
See also: Horde_Share_Base::removeShare()
public shareRemoveCallback ( Horde_Share_Object $share )
$share Horde_Share_Object

unlock() public method

Removes the lock for a lock ID.
public unlock ( Horde_Lock $locks, string $lockid ) : boolean
$locks Horde_Lock The lock object
$lockid string The lock ID as generated by a previous call to lock().
return boolean

Property Details

$_share protected_oe property

The composed Horde_Share driver
protected Horde_Share_Base $_share
return Horde_Share_Base

$_storageMap protected_oe property

Maps the concrete share class to the required storage adapter.
protected array $_storageMap
return array