\Horde_Core_Share_Driver

Horde specific wrapper for Horde_Share drivers. Adds Horde hook calls etc.

..

Copyright 2002-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://opensource.org/licenses/lgpl-2.1.php

Summary

Methods
Properties
Constants
__construct()
__call()
lock()
unlock()
checkLocks()
shareListCallback()
shareAddCallback()
shareRemoveCallback()
shareModifyCallback()
No public properties found
No constants found
No protected methods found
$_share
$_storageMap
N/A
No private methods found
No private properties found
N/A

Properties

$_share

$_share : \Horde_Share_Base

The composed Horde_Share driver

Type

\Horde_Share_Base

$_storageMap

$_storageMap : array

Maps the concrete share class to the required storage adapter.

Type

array

Methods

__construct()

__construct(\Horde_Share_Base  $share) 

Parameters

\Horde_Share_Base $share

__call()

__call(string  $method, array  $args) : mixed

Delegate method calls to the composed share object.

Parameters

string $method

The method name

array $args

The method arguments

Returns

mixed —

The result of the method call

lock()

lock(\Horde_Lock  $locks, string  $uid = null) : mixed

Lock an item belonging to a share, or an entire share itself.

Parameters

\Horde_Lock $locks

The lock object.

string $uid

The uid of a specific object to lock, if null, entire share is locked.

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.

unlock()

unlock(\Horde_Lock  $locks, string  $lockid) : boolean

Removes the lock for a lock ID.

Parameters

\Horde_Lock $locks

The lock object

string $lockid

The lock ID as generated by a previous call to lock().

Returns

boolean

checkLocks()

checkLocks(\Horde_Lock  $locks, string  $item_uid = null) : array

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

\Horde_Lock $locks

The lock object.

string $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.

shareListCallback()

shareListCallback(string  $userid, array  $shares, array  $params = array()) : array

share_list callback

Parameters

string $userid

The userid listShares was called with

array $shares

The result of the listShares() call

array $params

The params that listShares() was called with

Returns

array —

An array of share objects

shareAddCallback()

shareAddCallback(\Horde_Share_Object  $share) 

Adds the share_add hook before delegating to the share object.

Parameters

\Horde_Share_Object $share

shareRemoveCallback()

shareRemoveCallback(\Horde_Share_Object  $share) 

Calls the share_remove hook before delegating to the share object.

Parameters

\Horde_Share_Object $share

shareModifyCallback()

shareModifyCallback(\Horde_Share_Object  $share) 

Parameters

\Horde_Share_Object $share