PHP 클래스 Gollem, horde

Copyright 1999-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.
저자: Max Kalika ([email protected])
저자: Chuck Hagenbuch ([email protected])
저자: Michael Slusarz ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$backend array Configuration hash for the current backend.

보호된 프로퍼티들

프로퍼티 타입 설명
$_columns array Cache for display columns.

공개 메소드들

메소드 설명
changeDir ( ) Changes the current directory of the Gollem session based on the 'dir' form field.
changePermissions ( string $dir, string $name, string $permission ) Change permissions on files using the current Gollem session settings.
checkPermissions ( string $filter, integer $permission = Horde_Perms::READ, string $resource = null ) : boolean Checks if a user has the specified permissions on a resource.
copyFile ( string $backend_f, string $dir, string $name, string $backend_t, string $newdir ) Copies a file using the current Gollem session settings.
createFolder ( string $dir, string $name, Horde_Vfs_Base $gollem_vfs = null ) Create a folder using the current Gollem session settings.
deleteFile ( string $dir, string $name ) Delete a file using the current Gollem session settings.
deleteFolder ( string $dir, string $name ) Delete a folder using the current Gollem session settings.
directoryNavLink ( string $currdir, string $url ) : string Produces a directory link used for navigation.
expireCache ( string $dir ) Expire a folder cache entry.
getColumns ( $backend ) : array Parses the 'columns' preference.
getDisplayPath ( string $path ) : string Generate the display path (the path with any root information stripped out).
getVFSPath ( string $fullpath ) : array Take a fully qualified and break off the file or directory name.
listFolder ( string $dir ) : array List the current folder.
moveFile ( string $backend_f, string $dir, string $name, string $backend_t, string $newdir ) Moves a file using the current Gollem session settings.
pathEncode ( string $path ) : string Convert a Gollem path into a URL encoded string, but keep '/'.
renameItem ( string $oldDir, string $old, string $newDir, $new ) Rename files using the current Gollem session settings.
setDir ( string $dir ) Changes the current directory of the Gollem session to the supplied value.
sortDate ( $a, $b ) Internal sorting function for 'date'.
sortName ( $a, $b ) Internal sorting function for 'name'.
sortSize ( $a, $b ) Internal sorting function for 'size'.
sortType ( $a, $b ) Internal sorting function for 'type'.
stripAPIPath ( string $path ) : string Cleans a path presented to Gollem's browse API call.
subdirectory ( string $base, string $dir ) : string Generate correct subdirectory links.
verifyDir ( string $dir ) : boolean This function verifies whether a given directory is below the root.
writeFile ( string $dir, string $name, string $filename ) Write an uploaded file to the VFS backend.

보호된 메소드들

메소드 설명
_copyFile ( $mode, $backend_f, $dir, $name, $backend_t, $newdir ) Private function that copies/moves files.
_getCacheID ( string $dir ) Generate the Cache ID for a directory.
_setLabel ( ) Set the lable to use for the current page.
_sortDirs ( $a, $b ) Internal helper to sort directories first if pref set.

메소드 상세

_copyFile() 보호된 정적인 메소드

Private function that copies/moves files.
protected static _copyFile ( $mode, $backend_f, $dir, $name, $backend_t, $newdir )

_getCacheID() 보호된 정적인 메소드

Generate the Cache ID for a directory.
protected static _getCacheID ( string $dir )
$dir string The directory name.

_setLabel() 보호된 정적인 메소드

Set the lable to use for the current page.
protected static _setLabel ( )

_sortDirs() 보호된 정적인 메소드

Internal helper to sort directories first if pref set.
protected static _sortDirs ( $a, $b )

changeDir() 공개 정적인 메소드

Changes the current directory of the Gollem session based on the 'dir' form field.
public static changeDir ( )

changePermissions() 공개 정적인 메소드

Change permissions on files using the current Gollem session settings.
public static changePermissions ( string $dir, string $name, string $permission )
$dir string The directory name.
$name string The filename to change permissions on.
$permission string The permission mode to set.

checkPermissions() 공개 정적인 메소드

Checks if a user has the specified permissions on a resource.
public static checkPermissions ( string $filter, integer $permission = Horde_Perms::READ, string $resource = null ) : boolean
$filter string What are we checking for. Either 'backend' or 'directory'.
$permission integer The permission to check for. One of the Horde_Perms constants.
$resource string The resource to check. If empty, check the current backend/directory.
리턴 boolean Returns true if the user has permission.

copyFile() 공개 정적인 메소드

Copies a file using the current Gollem session settings.
public static copyFile ( string $backend_f, string $dir, string $name, string $backend_t, string $newdir )
$backend_f string The backend to copy the file from.
$dir string The directory name of the original file.
$name string The original filename.
$backend_t string The backend to copy the file to.
$newdir string The directory to copy the file to.

createFolder() 공개 정적인 메소드

Create a folder using the current Gollem session settings.
public static createFolder ( string $dir, string $name, Horde_Vfs_Base $gollem_vfs = null )
$dir string The directory path.
$name string The folder to create.
$gollem_vfs Horde_Vfs_Base A VFS instance to use.

deleteFile() 공개 정적인 메소드

Delete a file using the current Gollem session settings.
public static deleteFile ( string $dir, string $name )
$dir string The directory name.
$name string The filename to delete.

deleteFolder() 공개 정적인 메소드

Delete a folder using the current Gollem session settings.
public static deleteFolder ( string $dir, string $name )
$dir string The subdirectory name.
$name string The folder name to delete.

expireCache() 공개 정적인 메소드

Expire a folder cache entry.
public static expireCache ( string $dir )
$dir string The directory name.

getColumns() 공개 정적인 메소드

Parses the 'columns' preference.
public static getColumns ( $backend ) : array
리턴 array The list of columns to be displayed.

getDisplayPath() 공개 정적인 메소드

Generate the display path (the path with any root information stripped out).
public static getDisplayPath ( string $path ) : string
$path string The path to display.
리턴 string The display path.

getVFSPath() 공개 정적인 메소드

This pair is used for the input to many VFS library functions.
public static getVFSPath ( string $fullpath ) : array
$fullpath string Path to be split.
리턴 array Array of ($path, $name)

listFolder() 공개 정적인 메소드

List the current folder.
public static listFolder ( string $dir ) : array
$dir string The directory name.
리턴 array The sorted list of files.

moveFile() 공개 정적인 메소드

Moves a file using the current Gollem session settings.
public static moveFile ( string $backend_f, string $dir, string $name, string $backend_t, string $newdir )
$backend_f string The backend to move the file from.
$dir string The directory name of the original file.
$name string The original filename.
$backend_t string The backend to move the file to.
$newdir string The directory to move the file to.

pathEncode() 공개 정적인 메소드

This allows for proper PATH_INFO path parsing. Special care is taken to handle "+" and " ".
public static pathEncode ( string $path ) : string
$path string Path to be urlencode()d.
리턴 string URL-encoded string with '/' preserved.

renameItem() 공개 정적인 메소드

Rename files using the current Gollem session settings.
public static renameItem ( string $oldDir, string $old, string $newDir, $new )
$oldDir string Old directory name.
$old string Old file name.
$newDir string New directory name.

setDir() 공개 정적인 메소드

Changes the current directory of the Gollem session to the supplied value.
public static setDir ( string $dir )
$dir string Directory name.

sortDate() 공개 정적인 메소드

Internal sorting function for 'date'.
public static sortDate ( $a, $b )

sortName() 공개 정적인 메소드

Internal sorting function for 'name'.
public static sortName ( $a, $b )

sortSize() 공개 정적인 메소드

Internal sorting function for 'size'.
public static sortSize ( $a, $b )

sortType() 공개 정적인 메소드

Internal sorting function for 'type'.
public static sortType ( $a, $b )

stripAPIPath() 공개 정적인 메소드

This will remove: - leading '/' - leading 'gollem' - trailing '/' The desired end result is the path including VFS backend.
public static stripAPIPath ( string $path ) : string
$path string Path as presented to Gollem API.
리턴 string Cleaned path as described above.

subdirectory() 공개 정적인 메소드

Generate correct subdirectory links.
public static subdirectory ( string $base, string $dir ) : string
$base string The base directory.
$dir string The directory string.
리턴 string The correct subdirectoy string.

verifyDir() 공개 정적인 메소드

This function verifies whether a given directory is below the root.
public static verifyDir ( string $dir ) : boolean
$dir string The directory to check.
리턴 boolean True if the directory is below the root.

writeFile() 공개 정적인 메소드

Write an uploaded file to the VFS backend.
public static writeFile ( string $dir, string $name, string $filename )
$dir string The directory name.
$name string The filename to create.
$filename string The local file containing the file data.

프로퍼티 상세

$_columns 보호되어 있는 정적으로 프로퍼티

Cache for display columns.
protected static array $_columns
리턴 array

$backend 공개적으로 정적으로 프로퍼티

Configuration hash for the current backend.
public static array $backend
리턴 array