Class Comment

Description

Implements interfaces:

Habari CommentRecord Class

Located in /system/classes/comment.php (line 20)

QueryRecord
   |
   --Comment
Class Constant Summary
Variable Summary
static mixed $comment_status_list
static mixed $comment_type_list
Method Summary
static void create (array $paramarray)
static void default_fields ()
static array get ([int $ID = 0])
static array list_comment_statuses ([bool $refresh = false])
static array list_comment_types ([bool $refresh = false])
static mixed status (mixed $name)
static mixed status_name (mixed $status)
static mixed type (mixed $name)
static mixed type_name (mixed $type)
Comment __construct ([array $paramarray = array()])
string content_type ()
void delete ()
void insert ()
void update ()
mixed __get (string $name)
mixed __set (string $name,  $value)
Variables
static mixed $comment_status_list = array() (line 38)
static mixed $comment_type_list = array() (line 39)

Inherited Variables

Inherited from QueryRecord

QueryRecord::$fields
QueryRecord::$newfields
QueryRecord::$unsetfields
Methods
static method create (line 102)

static function create

Creates a comment and saves it

static void create (array $paramarray)
  • array $paramarray: An associative array of comment fields $return Comment The comment object that was created
static method default_fields (line 45)

static function default_fields

Returns the defined database columns for a comment

  • access: public
static void default_fields ()
static method get (line 88)

static function get Returns a single comment, by ID

  1.  $post Post::get10 );

  • return: A single Comment object
static array get ([int $ID = 0])
  • int $ID: An ID
static method list_comment_statuses (line 352)

returns an associative array of comment statuses

  • return: An array of comment statuses names => interger values
  • access: public
static array list_comment_statuses ([bool $refresh = false])
  • bool $refresh: whether to force a refresh of the cached values
static method list_comment_types (line 334)

returns an associative array of comment types

  • return: An array of comment type names => integer values
  • access: public
static array list_comment_types ([bool $refresh = false])
  • bool $refresh: whether to force a refresh of the cached values
static method status (line 372)

returns the integer value of the specified comment status, or false

  • return: an integer or boolean false
  • access: public
static mixed status (mixed $name)
  • mixed $name: a comment status name or value
static method status_name (line 390)

returns the friendly name of a comment status, or null

  • return: a string of the status name, or null
  • access: public
static mixed status_name (mixed $status)
  • mixed $status: a comment status value, or name
static method type (line 408)

returns the integer value of the specified comment type, or false

  • return: an integer or boolean false
  • access: public
static mixed type (mixed $name)
  • mixed $name: a comment type name or number
static method type_name (line 426)

returns the friendly name of a comment type, or null

  • return: a string of the comment type, or null
  • access: public
static mixed type_name (mixed $type)
  • mixed $type: a comment type number, or name
Constructor __construct (line 66)

constructor __construct Constructor for the Post class.

  • access: public
Comment __construct ([array $paramarray = array()])
  • array $paramarray: an associative array of initial Post field values.

Redefinition of:
QueryRecord::__construct()
constructor __construct Constructor for the QueryRecord class.
content_type (line 445)

Return the content type of this object

  • return: The content type of this object
  • see: IsContent
  • access: public
string content_type ()

Implementation of:
IsContent::content_type()
Returns the content type of the object instance
delete (line 162)

function delete

Deletes this comment

  • access: public
void delete ()

Redefinition of:
QueryRecord::delete()
This is the public interface that deletes a record
insert (line 113)

function insert

Saves a new comment to the posts table

  • access: public
void insert ()

Redefinition of:
QueryRecord::insert()
This is the public interface that inserts a record
update (line 138)

function update

Updates an existing comment in the posts table

  • access: public
void update ()

Redefinition of:
QueryRecord::update()
This is the public interface that updates a record
__get (line 184)

function __get

Overrides QueryRecord __get to implement custom object properties

  • return: The requested field value
  • access: public
mixed __get (string $name)
  • string $name: Name of property to return

Redefinition of:
QueryRecord::__get()
function __get
__set (line 230)

function __set

Overrides QueryRecord __set to implement custom object properties

  • return: The requested field value
  • access: public
mixed __set (string $name,  $value)
  • string $name: Name of property to return
  • $value

Redefinition of:
QueryRecord::__set()
function __set

Inherited Methods

Inherited From QueryRecord

QueryRecord::__construct()
QueryRecord::delete()
QueryRecord::deleteRecord()
QueryRecord::exclude_fields()
QueryRecord::get_url_args()
QueryRecord::insert()
QueryRecord::insertRecord()
QueryRecord::list_excluded_fields()
QueryRecord::to_array()
QueryRecord::update()
QueryRecord::updateRecord()
QueryRecord::__get()
QueryRecord::__isset()
QueryRecord::__set()
Class Constants
COMMENT = 0 (line 29)
PINGBACK = 1 (line 30)
STATUS_APPROVED = 1 (line 25)
STATUS_DELETED = 3 (line 27)
STATUS_SPAM = 2 (line 26)
STATUS_UNAPPROVED = 0 (line 24)
TRACKBACK = 2 (line 31)

Documentation generated on Thu, 30 Oct 2008 20:31:03 +0100 by phpDocumentor 1.3.2