Campustream 1.0
A social network MQP for WPI
|
Public Member Functions | |
load_user () | |
load_question () | |
vote ($dir) | |
has_voted () | |
save ($post_status=true) | |
__get ($key) | |
Data Fields | |
$table_name = 'responses' | |
$columns = array('id', 'question_id', 'user_id', 'message', 'post_date', 'vote_count', 'is_public') | |
$cache_keys = array( 'response/#' => 'id', 'responses/question:#' => 'question_id', 'responses/user:#' => 'user_id' ) | |
$has_one = array('question', 'user') | |
$public_columns = array( 'id', 'question_id', 'user_id', 'message', 'post_date', 'vote_count', 'up_votes', 'down_votes' ) |
Represents a single response to a question
Definition at line 6 of file response.php.
__get | ( | $ | key | ) |
Reimplemented from ActiveRecord.
Definition at line 161 of file response.php.
has_voted | ( | ) |
Has the active user voted on this response yet?
Definition at line 97 of file response.php.
load_question | ( | ) |
Load the corresponding question that this response was posted under
Definition at line 31 of file response.php.
load_user | ( | ) |
Load the user that posted this response
Definition at line 16 of file response.php.
save | ( | $ | post_status = true | ) |
Save this response and post a status message
Definition at line 121 of file response.php.
vote | ( | $ | dir | ) |
Add or remove a vote for this response
$dir | up or down |
Definition at line 48 of file response.php.
$cache_keys = array( 'response/#' => 'id', 'responses/question:#' => 'question_id', 'responses/user:#' => 'user_id' ) |
Definition at line 9 of file response.php.
$columns = array('id', 'question_id', 'user_id', 'message', 'post_date', 'vote_count', 'is_public') |
Reimplemented from ActiveRecord.
Definition at line 8 of file response.php.
$has_one = array('question', 'user') |
Reimplemented from ActiveRecord.
Definition at line 10 of file response.php.
$public_columns = array( 'id', 'question_id', 'user_id', 'message', 'post_date', 'vote_count', 'up_votes', 'down_votes' ) |
Definition at line 11 of file response.php.
$table_name = 'responses' |
Reimplemented from ActiveRecord.
Definition at line 7 of file response.php.