The Red Matrix
 All Classes Namespaces Files Functions Variables Pages
Item Class Reference
Inheritance diagram for Item:
BaseObject

Public Member Functions

 __construct ($data)
 
 get_template_data ($alike, $dlike, $thread_level=1)
 
 get_id ()
 
 is_threaded ()
 
 set_commentable ($val)
 
 is_commentable ()
 
 add_child ($item)
 
 get_child ($id)
 
 get_children ()
 
 remove_child ($item)
 
 set_conversation ($conv)
 
 get_conversation ()
 
 get_data ()
 
 get_data_value ($name)
 
- Public Member Functions inherited from BaseObject
 get_app ()
 

Public Attributes

 $data = array()
 

Protected Member Functions

 set_parent ($item)
 
 remove_parent ()
 
 get_parent ()
 
 check_wall_to_wall ()
 

Private Member Functions

 get_template ()
 
 is_toplevel ()
 
 count_descendants ()
 
 get_comment_box_template ()
 
 get_comment_box ($indent)
 
 get_redirect_url ()
 
 is_wall_to_wall ()
 
 get_owner_url ()
 
 get_owner_photo ()
 
 get_owner_name ()
 
 is_visiting ()
 

Private Attributes

 $template = 'conv_item.tpl'
 
 $comment_box_template = 'comment_item.tpl'
 
 $commentable = false
 
 $toplevel = false
 
 $children = array()
 
 $parent = null
 
 $conversation = null
 
 $redirect_url = null
 
 $owner_url = ''
 
 $owner_photo = ''
 
 $owner_name = ''
 
 $wall_to_wall = false
 
 $threaded = false
 
 $visiting = false
 
 $channel = null
 

Additional Inherited Members

- Static Public Member Functions inherited from BaseObject
static set_app ($app)
 

Detailed Description

An item

Constructor & Destructor Documentation

Item::__construct (   $data)

Member Function Documentation

Item::add_child (   $item)

Add a child item

Referenced by __construct().

Item::check_wall_to_wall ( )
protected

Check if we are a wall to wall item and set the relevant properties

Referenced by get_template_data().

Item::count_descendants ( )
private

Count the total of our descendants

Referenced by get_template_data().

Item::get_child (   $id)

Get a child by its ID

Referenced by add_child().

Item::get_children ( )
Item::get_comment_box (   $indent)
private

Get the comment box

Returns: _ The comment box string (empty if no comment box) _ false on failure

Referenced by get_template_data().

Item::get_comment_box_template ( )
private

Get the template for the comment box

Referenced by get_comment_box().

Item::get_conversation ( )

get conversation

Referenced by check_wall_to_wall(), get_comment_box(), and get_template_data().

Item::get_data ( )

Get raw data

We shouldn't need this

Referenced by get_template_data().

Item::get_data_value (   $name)

Get a data value

Returns: _ value on success _ false on failure

Referenced by __construct(), check_wall_to_wall(), get_id(), and get_template_data().

Item::get_id ( )
Item::get_owner_name ( )
private

Referenced by get_template_data().

Item::get_owner_photo ( )
private

Referenced by get_template_data().

Item::get_owner_url ( )
private

Referenced by get_template_data().

Item::get_parent ( )
protected

Get parent item

Referenced by set_parent().

Item::get_redirect_url ( )
private
Item::get_template ( )
private

Get template

Referenced by get_template_data().

Item::get_template_data (   $alike,
  $dlike,
  $thread_level = 1 
)

Get data in a form usable by a conversation template

Returns: _ The data requested on success _ false on failure

Item::is_commentable ( )
Item::is_threaded ( )
Item::is_toplevel ( )
private

Check if this is a toplevel post

Referenced by check_wall_to_wall(), get_comment_box(), and get_template_data().

Item::is_visiting ( )
private
Item::is_wall_to_wall ( )
private
Item::remove_child (   $item)

Remove a child

Item::remove_parent ( )
protected

Remove our parent

Item::set_commentable (   $val)
Item::set_conversation (   $conv)

set conversation

Referenced by set_parent().

Item::set_parent (   $item)
protected

Set our parent

Member Data Documentation

Item::$channel = null
private
Item::$children = array()
private
Item::$comment_box_template = 'comment_item.tpl'
private
Item::$commentable = false
private

Referenced by is_commentable().

Item::$conversation = null
private

Referenced by get_conversation().

Item::$data = array()

Referenced by __construct(), and get_data().

Item::$owner_name = ''
private

Referenced by get_owner_name().

Item::$owner_photo = ''
private

Referenced by get_owner_photo().

Item::$owner_url = ''
private

Referenced by get_owner_url().

Item::$parent = null
private

Referenced by get_parent(), and set_parent().

Item::$redirect_url = null
private

Referenced by get_redirect_url().

Item::$template = 'conv_item.tpl'
private

Referenced by get_comment_box(), and get_template().

Item::$threaded = false
private

Referenced by is_threaded().

Item::$toplevel = false
private

Referenced by is_toplevel().

Item::$visiting = false
private

Referenced by is_visiting().

Item::$wall_to_wall = false
private

Referenced by is_wall_to_wall().


The documentation for this class was generated from the following file: