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])
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_share Horde_Share_Base The composed Horde_Share driver
$_storageMap array Maps the concrete share class to the required storage adapter.

Méthodes publiques

Méthode 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 méthode

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
Résultat mixed The result of the method call

__construct() public méthode

public __construct ( Horde_Share_Base $share )
$share Horde_Share_Base

checkLocks() public méthode

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.
Résultat 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 méthode

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.
Résultat 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 méthode

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

shareListCallback() public méthode

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
Résultat array An array of share objects

shareModifyCallback() public méthode

public shareModifyCallback ( Horde_Share_Object $share )
$share Horde_Share_Object

shareRemoveCallback() public méthode

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 méthode

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().
Résultat boolean

Property Details

$_share protected_oe property

The composed Horde_Share driver
protected Horde_Share_Base $_share
Résultat Horde_Share_Base

$_storageMap protected_oe property

Maps the concrete share class to the required storage adapter.
protected array $_storageMap
Résultat array