PHP Class Agora, horde

Copyright 2003-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: Marko Djukic ([email protected])
Mostrar archivo Open project: horde/horde Class Usage Examples

Public Methods

Method Description
distribute ( integer $message_id ) Send new posts to a distribution email address for a wider audience
formatCategoryTree ( array $forums ) : array Formats a list of forums, showing each child of a parent with appropriate indent using '.
formatColumnHeaders ( array $columns, string $sort_by, string $sort_dir, string $view ) : array Formats column headers have sort links and sort arrows.
getAgoraId ( ) : array Determines the requested forum_id, message_id and application by checking first if they are passed as the single encoded var or individual vars.
getAvatarUrl ( $avatar_path, $scopeend_sid = true )
getCAPTCHA ( boolean $new = false ) : string Returns a new or the current CAPTCHA string.
getSortBy ( string $view ) : string Returns the column to sort by, checking first if it is specified in the URL, then returning the value stored in prefs.
getSortDir ( string $view ) : integer Returns the sort direction, checking first if it is specified in the URL, then returning the value stored in prefs.
getVFS ( ) : VFS Returns a {@link VFS} instance.
setAgoraId ( $forum_id, $message_id, $url = '', $scope = null, $encode = false ) : string Creates the Agora id.
validateAvatar ( $avatar_path )

Method Details

distribute() public method

Send new posts to a distribution email address for a wider audience
public distribute ( integer $message_id )
$message_id integer Identifier of message to be distributed

formatCategoryTree() public method

. ' as a leader.
public formatCategoryTree ( array $forums ) : array
$forums array The list of forums to format.
return array Formatted forum list.

formatColumnHeaders() public method

Formats column headers have sort links and sort arrows.
public formatColumnHeaders ( array $columns, string $sort_by, string $sort_dir, string $view ) : array
$columns array The columns to format.
$sort_by string The current 'sort-by' column.
$sort_dir string The current sort direction.
$view string The view name, used to identify preference settings for sorting.
return array The formated column headers to be displayed.

getAgoraId() public method

Determines the requested forum_id, message_id and application by checking first if they are passed as the single encoded var or individual vars.
public getAgoraId ( ) : array
return array Forum, message id and application.

getAvatarUrl() public method

public getAvatarUrl ( $avatar_path, $scopeend_sid = true )

getCAPTCHA() public method

Returns a new or the current CAPTCHA string.
public getCAPTCHA ( boolean $new = false ) : string
$new boolean If true, a new CAPTCHA is created and returned. The current, to-be-confirmed string otherwise.
return string A CAPTCHA string.

getSortBy() public method

Returns the column to sort by, checking first if it is specified in the URL, then returning the value stored in prefs.
public getSortBy ( string $view ) : string
$view string The view name, used to identify preference settings for sorting.
return string The column to sort by.

getSortDir() public method

Returns the sort direction, checking first if it is specified in the URL, then returning the value stored in prefs.
public getSortDir ( string $view ) : integer
$view string The view name, used to identify preference settings for sorting.
return integer The sort direction, 0 = ascending, 1 = descending.

getVFS() public method

Returns a {@link VFS} instance.
public getVFS ( ) : VFS
return VFS A VFS instance.

setAgoraId() public method

Creates the Agora id.
public setAgoraId ( $forum_id, $message_id, $url = '', $scope = null, $encode = false ) : string
return string If passed with the $url parameter, returns a completed url with the agora_id tacked on at the end, otherwise returns the simple agora_id.

validateAvatar() public method

public validateAvatar ( $avatar_path )