Documentation

Horde_Core_Share_Driver
in package

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

Tags
author

Michael J. Rubinsky mrubinsk@horde.org

category

Horde

license

http://opensource.org/licenses/lgpl-2.1.php LGPL

Table of Contents

Properties

$_share  : Horde_Share_Base
The composed Horde_Share driver
$_storageMap  : array<string|int, mixed>
Maps the concrete share class to the required storage adapter.

Methods

__call()  : mixed
Delegate method calls to the composed share object.
__construct()  : mixed
checkLocks()  : array<string|int, mixed>
Checks for existing locks.
lock()  : mixed
Lock an item belonging to a share, or an entire share itself.
shareAddCallback()  : mixed
Adds the share_add hook before delegating to the share object.
shareListCallback()  : array<string|int, mixed>
share_list callback
shareModifyCallback()  : mixed
shareRemoveCallback()  : mixed
Calls the share_remove hook before delegating to the share object.
unlock()  : bool
Removes the lock for a lock ID.

Properties

$_share

The composed Horde_Share driver

protected Horde_Share_Base $_share

$_storageMap

Maps the concrete share class to the required storage adapter.

protected array<string|int, mixed> $_storageMap = array('Horde_Share_Sql' => 'Horde_Db_Adapter', 'Horde_Share_Sqlng' => 'Horde_Db_Adapter', 'Horde_Share_Sql_Hierarchical' => 'Horde_Db_Adapter', 'Horde_Share_Kolab' => 'Horde_Kolab_Storage')

Methods

__call()

Delegate method calls to the composed share object.

public __call(string $method, array<string|int, mixed> $args) : mixed
Parameters
$method : string

The method name

$args : array<string|int, mixed>

The method arguments

Return values
mixed

The result of the method call

__construct()

public __construct(Horde_Share_Base $share) : mixed
Parameters
$share : Horde_Share_Base

checkLocks()

Checks for existing locks.

public checkLocks(Horde_Lock $locks[, string $item_uid = null ]) : array<string|int, mixed>

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 : Horde_Lock

The lock object.

$item_uid : string = null

A uid of an item from this share.

Return values
array<string|int, mixed>

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()

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

public lock(Horde_Lock $locks[, string $uid = null ]) : mixed
Parameters
$locks : Horde_Lock

The lock object.

$uid : string = null

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

Return values
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()

Adds the share_add hook before delegating to the share object.

public shareAddCallback(Horde_Share_Object $share) : mixed
Parameters
$share : Horde_Share_Object

shareListCallback()

share_list callback

public shareListCallback(string $userid, array<string|int, mixed> $shares[, array<string|int, mixed> $params = array() ]) : array<string|int, mixed>
Parameters
$userid : string

The userid listShares was called with

$shares : array<string|int, mixed>

The result of the listShares() call

$params : array<string|int, mixed> = array()

The params that listShares() was called with

Return values
array<string|int, mixed>

An array of share objects

shareModifyCallback()

public shareModifyCallback(Horde_Share_Object $share) : mixed
Parameters
$share : Horde_Share_Object

shareRemoveCallback()

Calls the share_remove hook before delegating to the share object.

public shareRemoveCallback(Horde_Share_Object $share) : mixed
Parameters
$share : Horde_Share_Object
Tags
see
Horde_Share_Base::removeShare()

unlock()

Removes the lock for a lock ID.

public unlock(Horde_Lock $locks, string $lockid) : bool
Parameters
$locks : Horde_Lock

The lock object

$lockid : string

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

Return values
bool

        
On this page

Search results