Overview

Packages

  • Gollem
  • None

Classes

  • Gollem
  • Gollem_Ajax_Application
  • Gollem_Api
  • Gollem_Auth
  • Gollem_Exception
  • Gollem_Factory_Vfs
  • Gollem_Factory_VfsDefault
  • Gollem_LoginTasks_SystemTask_Upgrade
  • Gollem_Test
  • Overview
  • Package
  • Class
  • Tree

Class Gollem_Api

Gollem external API interface.

This file defines Gollem's external API interface. Other applications can interact with Gollem through this API.

Copyright 2010-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.

Horde_Registry_Api
Extended by Gollem_Api
Package: Gollem
Category: Horde
License: GPL
Author: Amith Varghese amith@xalan.com
Author: Michael Slusarz slusarz@horde.org
Author: Ben Klang bklang@alkaloid.net
Located at Api.php
Methods summary
public array
# browse( string $path = '', array $properties = array('name', 'icon' ,'browseable') )

Browses through the VFS tree.

Browses through the VFS tree.

Each VFS backend is listed as a directory at the top level. No modify operations are allowed outside any VFS area.

Parameters

$path
The level of the tree to browse.
$properties
<p>The item properties to return. Defaults to 'name', 'icon', and 'browseable'.</p>

Returns

array
The contents of $path.

Throws

Gollem_Exception
public
# put( string $path, string $content, string $content_type )

Accepts a file for storage into the VFS.

Accepts a file for storage into the VFS.

Parameters

$path
Path to store file.
$content
Contents of file.
$content_type
MIME type of file.

Throws

Gollem_Exception
public
# mkcol( string $path )

Creates a directory ("collection" in WebDAV-speak) within the VFS

Creates a directory ("collection" in WebDAV-speak) within the VFS

Parameters

$path
Path of directory to create

Throws

Gollem_Exception
public
# move( string $path, string $dest )

Renames a file or directory

Renames a file or directory

Parameters

$path
Path to source object to be renamed
$dest
Path to new name
public
# path_delete( string $path )

Removes a file or folder from the VFS

Removes a file or folder from the VFS

Parameters

$path
Path of file or folder to delete
public Horde_Url
# getViewLink( string $dir, string $file, string $backend_key = '' )

Returns a link to the gollem file preview interface

Returns a link to the gollem file preview interface

Parameters

$dir
File absolute path
$file
File basename
$backend_key
<p>Backend key. Defaults to Gollem_Auth::getPreferredBackend().</p>

Returns

Horde_Url
The URL object.
public string
# selectlistLink( string $link_text, string $link_style, string $formid, boolean $icon = false, string $selectid = '' )

Creates a link to the gollem file selection window.

Creates a link to the gollem file selection window.

The file section window will return a cache ID value which should be used (along with the selectListResults and returnFromSelectList functions below) to obtain the data from a list of selected files.

There MUST be a form field named 'selectlist_selectid' in the calling form. This field will be populated with the selection ID when the user completes file selection.

There MUST be a form parameter named 'actionID' in the calling form. This form will be populated with the value 'selectlist_process' when the user completes file selection. The calling form will be submitted after the window closes (i.e. the calling form must process the 'selectlist_process' actionID).

Parameters

$link_text
The text to use in the link.
$link_style
The style to use for the link.
$formid
The formid of the calling script.
$icon
<p>Create the link with an icon instead of text?</p>
$selectid
Selection ID.

Returns

string
The URL string.
public
# selectlistResults( string $selectid )

Returns the list of files selected by the user for a given selection ID.

Returns the list of files selected by the user for a given selection ID.

Parameters

$selectid
The selection ID.
public string
# returnFromSelectlist( string $selectid, integer $index )

Returns the data for a given selection ID and index.

Returns the data for a given selection ID and index.

Parameters

$selectid
The selection ID.
$index
The index of the file data to return.

Returns

string
The file data.
public string
# setSelectlist( string $selectid = '', array $files = array() )

Sets the files selected for a given selection ID.

Sets the files selected for a given selection ID.

Parameters

$selectid
The selection ID to use.
$files
<p>An array with each file entry stored in its own array, with the key as the directory name and the value as the filename.</p>

Returns

string
The selection ID.
API documentation generated by ApiGen