PHP Class Agora_Driver_SplitSql, 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: Duck ([email protected])
Inheritance: extends Agora_Driver
Datei anzeigen Open project: horde/horde

Public Methods

Method Description
__construct ( $scope ) Constructor
getBareForums ( ) : array Get forums ids and titles
getForumId ( string $forum_name ) : integer Returns an ID for a given forum name.
getThreadsByForumOwner ( string $forum_owner, integer $thread_root, boolean $all_levels = false, string $sort_by = 'message_modifystamp', integer $sort_dir, boolean $message_view = false, string $from, string $count ) Returns a list of threads.

Protected Methods

Method Description
_getForums ( integer $root_forum, boolean $formatted = true, string $sort_by = 'forum_name', integer $sort_dir, boolean $add_scope = false, string $from, string $count ) : array Fetches a list of forums.
_getThreads ( integer $thread_root, boolean $all_levels = false, string $sort_by = 'message_modifystamp', integer $sort_dir, boolean $message_view = false, string $from, string $count ) Returns a list of threads.

Private Methods

Method Description
_buildThreadsQuery ( string $forum_owner = null, integer $thread_root, boolean $all_levels = false, string $sort_by = 'message_modifystamp', integer $sort_dir, boolean $message_view = false, string $from, string $count ) Build threads query.

Method Details

__construct() public method

Constructor
public __construct ( $scope )

_getForums() protected method

Fetches a list of forums.
protected _getForums ( integer $root_forum, boolean $formatted = true, string $sort_by = 'forum_name', integer $sort_dir, boolean $add_scope = false, string $from, string $count ) : array
$root_forum integer The first level forum.
$formatted boolean Whether to return the list formatted or raw.
$sort_by string The column to sort by.
$sort_dir integer Sort direction, 0 = ascending, 1 = descending.
$add_scope boolean Add parent forum if forum for another scopelication.
$from string The forum to start listing at.
$count string The number of forums to return.
return array An array of forums.

_getThreads() protected method

Returns a list of threads.
protected _getThreads ( integer $thread_root, boolean $all_levels = false, string $sort_by = 'message_modifystamp', integer $sort_dir, boolean $message_view = false, string $from, string $count )
$thread_root integer Message at which to start the thread. If null get all forum threads
$all_levels boolean Show all child levels or just one level.
$sort_by string The column by which to sort.
$sort_dir integer The direction by which to sort: 0 - ascending 1 - descending
$message_view boolean
$from string The thread to start listing at.
$count string The number of threads to return.

getBareForums() public method

Get forums ids and titles
public getBareForums ( ) : array
return array An array of forums and form names.

getForumId() public method

Returns an ID for a given forum name.
public getForumId ( string $forum_name ) : integer
$forum_name string The full forum name.
return integer The ID of the forum.

getThreadsByForumOwner() public method

Returns a list of threads.
public getThreadsByForumOwner ( string $forum_owner, integer $thread_root, boolean $all_levels = false, string $sort_by = 'message_modifystamp', integer $sort_dir, boolean $message_view = false, string $from, string $count )
$forum_owner string Forum owner
$thread_root integer Message at which to start the thread. If null get all forum threads
$all_levels boolean Show all child levels or just one level.
$sort_by string The column by which to sort.
$sort_dir integer The direction by which to sort: 0 - ascending 1 - descending
$message_view boolean
$from string The thread to start listing at.
$count string The number of threads to return.