PHP Class Gollem_Api, horde

This file defines Gollem's external API interface. Other applications can interact with Gollem through this API. Copyright 2010-2016 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.
Author: Amith Varghese ([email protected])
Author: Michael Slusarz ([email protected])
Author: Ben Klang ([email protected])
Inheritance: extends Horde_Registry_Api
Show file Open project: horde/horde

Public Methods

Method Description
browse ( string $path = '', array $properties = ['name', 'icon', 'browseable'] ) : array Browses through the VFS tree.
getViewLink ( string $dir, string $file, string $backend_key = '' ) : Horde_Url Returns a link to the gollem file preview interface
mkcol ( string $path ) Creates a directory ("collection" in WebDAV-speak) within the VFS
move ( string $path, string $dest ) Renames a file or directory
path_delete ( string $path ) Removes a file or folder from the VFS
put ( string $path, string $content, string $content_type ) Accepts a file for storage into the VFS.
returnFromSelectlist ( string $selectid, integer $index ) : string Returns the data for a given selection ID and index.
selectlistLink ( string $link_text, string $link_style, string $formid, boolean $icon = false, string $selectid = '' ) : string Creates a link to the gollem file selection window.
selectlistResults ( string $selectid ) Returns the list of files selected by the user for a given selection ID.
setSelectlist ( string $selectid = '', array $files = [] ) : string Sets the files selected for a given selection ID.

Protected Methods

Method Description
_getBackend ( $path )

Method Details

_getBackend() protected method

protected _getBackend ( $path )

browse() public method

Each VFS backend is listed as a directory at the top level. No modify operations are allowed outside any VFS area.
public browse ( string $path = '', array $properties = ['name', 'icon', 'browseable'] ) : array
$path string The level of the tree to browse.
$properties array The item properties to return. Defaults to 'name', 'icon', and 'browseable'.
return array The contents of $path.

mkcol() public method

Creates a directory ("collection" in WebDAV-speak) within the VFS
public mkcol ( string $path )
$path string Path of directory to create

move() public method

Renames a file or directory
public move ( string $path, string $dest )
$path string Path to source object to be renamed
$dest string Path to new name

path_delete() public method

Removes a file or folder from the VFS
public path_delete ( string $path )
$path string Path of file or folder to delete

put() public method

Accepts a file for storage into the VFS.
public put ( string $path, string $content, string $content_type )
$path string Path to store file.
$content string Contents of file.
$content_type string MIME type of file.

returnFromSelectlist() public method

Returns the data for a given selection ID and index.
public returnFromSelectlist ( string $selectid, integer $index ) : string
$selectid string The selection ID.
$index integer The index of the file data to return.
return string The file data.

selectlistResults() public method

Returns the list of files selected by the user for a given selection ID.
public selectlistResults ( string $selectid )
$selectid string The selection ID.

setSelectlist() public method

Sets the files selected for a given selection ID.
public setSelectlist ( string $selectid = '', array $files = [] ) : string
$selectid string The selection ID to use.
$files array An array with each file entry stored in its own array, with the key as the directory name and the value as the filename.
return string The selection ID.