Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

BaseThread Class Reference
[Object Managers]

Inheritance diagram for BaseThread:

MyManager ObjectManager MyModule BaseModule List of all members.

Detailed Description

Handles drawing a comment thrad for a BaseObject.

The thread object handles drawing comment threads for the associate BaseObject. RSS, threading, etc are all supported.

Definition at line 10 of file base-thread.inc.php.

Public Member Functions

 __construct ($contentId, $class, $table=null, $objectType=null)
 this is our construtor!
 getMainPageXml ()
 get our main page xml.
 initMainPage ()
 prep our main main page...
 drawMainPage ()
 draw our main page, which is the comment table
 factory ($data=null)
 Creates a new comment of our type...
 delete ()
 deletes our comment thread.
 getCommentCount ($ids=null)
 gets the count of comments in this thread or multiple threads.
 drawCommentSummary ()
 draws a summary of the comments...
 drawCommentTable ()
 This draws teh comment table.
 getComments ()
 This gets all the comments for this content id.
 drawComments ()
 this draws all the comments in teh thread.
 initSearchPage ()
 this initializes teh rss page.
 generateRss ($params=array())
 this genearates the rss object.
 getSearchParamXml ()
 add content id as required parameter.

Public Attributes

 $ContentClass
 private The name of the class that we're doing comments for.
 $count = null
 public the count of comments in teh thread.

Private Attributes

 $contentId
 private The id of the content the thread is for.


Member Function Documentation

BaseThread::__construct contentId,
class,
table = null,
objectType = null
 

this is our construtor!

Parameters:
$contentId teh id of the content the thread is on
$class the name of the class that our comments are on... see description of public variable ContentClass.
$table optional parameter for table... defaults to comments_{$class}
$objectType optional parameter for name of class for comments we're managing... defaults to {$class}Comment

Definition at line 35 of file base-thread.inc.php.

BaseThread::delete  ) 
 

deletes our comment thread.

Definition at line 97 of file base-thread.inc.php.

References ObjectManager::search().

BaseThread::drawComments  ) 
 

this draws all the comments in teh thread.

Definition at line 195 of file base-thread.inc.php.

References getComments().

Referenced by drawCommentTable().

BaseThread::drawCommentSummary  ) 
 

draws a summary of the comments...

basically how many comments with a link to view them. wrapped in a span with class of 'commentSummary'

Definition at line 146 of file base-thread.inc.php.

References getCommentCount(), BaseModule::getUrl(), and Util::pluralize().

BaseThread::drawCommentTable  ) 
 

This draws teh comment table.

It's wrapped in a div with id of 'commentContainer' if useRss == true, it will also draw a comment rss feed link.

Definition at line 161 of file base-thread.inc.php.

References drawComments(), and ObjectManager::getRssLink().

Referenced by drawMainPage().

BaseThread::drawMainPage  ) 
 

draw our main page, which is the comment table

Reimplemented from BaseModule.

Definition at line 79 of file base-thread.inc.php.

References drawCommentTable().

BaseThread::factory data = null  ) 
 

Creates a new comment of our type...

Parameters:
$data the data to load the class with.

Reimplemented from ObjectManager.

Definition at line 89 of file base-thread.inc.php.

BaseThread::generateRss params = array()  ) 
 

this genearates the rss object.

The link goes to the content view page and the title is the Config::get('site_name') $class Comment Thread

Definition at line 215 of file base-thread.inc.php.

References Config::get(), and BaseModule::getUrl().

BaseThread::getCommentCount ids = null  ) 
 

gets the count of comments in this thread or multiple threads.

Parameters:
$ids either an id or an array of ids to fetch counts for.
if $ids is an array, it will return an associative array of counts with the key being the content id, otherwise it will return a count for that content id.

Definition at line 114 of file base-thread.inc.php.

References dbFetchAssoc(), dbGetNumRows(), and dbQuery().

Referenced by drawCommentSummary().

BaseThread::getComments  ) 
 

This gets all the comments for this content id.

Returns:
an array of comment objects

Definition at line 185 of file base-thread.inc.php.

References ObjectManager::search().

Referenced by drawComments().

BaseThread::getMainPageXml  ) 
 

get our main page xml.

we want to display the comment thread for the object

Reimplemented from BaseModule.

Definition at line 59 of file base-thread.inc.php.

BaseThread::getSearchParamXml  ) 
 

add content id as required parameter.

this means you can only get comments for an individual object

See also:
ObjectManager::getSearchParamXml()

Reimplemented from ObjectManager.

Definition at line 231 of file base-thread.inc.php.

BaseThread::initMainPage  ) 
 

prep our main main page...

set content id

Reimplemented from ObjectManager.

Definition at line 71 of file base-thread.inc.php.

References BaseModule::params().

BaseThread::initSearchPage  ) 
 

this initializes teh rss page.

Reimplemented from ObjectManager.

Definition at line 204 of file base-thread.inc.php.

References BaseModule::params().


Member Data Documentation

BaseThread::$ContentClass
 

private The name of the class that we're doing comments for.

if this is an ImageThread, it would be 'Image'

Definition at line 20 of file base-thread.inc.php.

BaseThread::$contentId [private]
 

private The id of the content the thread is for.

Definition at line 15 of file base-thread.inc.php.

BaseThread::$count = null
 

public the count of comments in teh thread.

Definition at line 25 of file base-thread.inc.php.


The documentation for this class was generated from the following file:
Generated on Fri Oct 27 12:26:41 2006 for BaseJumper by doxygen 1.3.9.1