Documentation is available at classes_comment.php
- <?php
- class comment extends b_object {
- //NOTE - object type definition "user types"
- var $comment_date;
- var $text;
- var $author_name;
- var $author_email;
- var $author_URI;
- function comment( $constructID = NULL ) {
- parent::b_object( $constructID, 'comments' );
- $this->comment_date = toPhpDate( $this->comment_date );
- }
- //NOTE: these functions are here to overload the base class functions if special data validation etc is needed
- //function &get_attribute( $attribute ) { }
- //function set_attribute( $attribute, $value ) { }
- //function set( $values ) { }
- //function set_db( $values ) { }
- //function set_object( $values ) { }
- //function delete() { }
- function get_contents( $navArray = NULL ) {
- //format navigation array
- //format object diplay fields
- $rawFieldArray = $this->type->get_attribute( 'type_object_field_list' );
- return parent::get_contents( $navArray, $rawFieldArray );
- }
- function get_index() {
- if( $this->text ) {
- $objectIndex = limitString( $this->text, 10 );
- } else {
- $objectIndex = "new comment";
- }
- return $objectIndex;
- }
- function verify_set( $comment ) {
- //verifies data before setting the object's values - returns an error array if problems are found
- $returnArray = array();
- if( isset($comment['comment_date']) ) {
- if( $comment['comment_date'] ) {
- $comment['comment_date'] = toDbDate( $comment['comment_date'] );
- } else {
- $comment['comment_date'] = toDbDate( 'today' );
- }
- }
- //if( !count($returnArray) ) {
- //THIS IS CRITICAL if you want to be able to relate things to the object
- parent::verify_set( $comment );
- //} else {
- //$GLOBALS['errorArray'] = $returnArray;
- //$this->set_object( $comment );
- //}
- }
- }
- ?>
Documentation generated on Tue, 24 May 2005 03:56:54 -0400 by phpDocumentor 1.3.0RC3