Campustream 1.0
A social network MQP for WPI
|
Public Member Functions | |
load_user () | |
load_responses () | |
num_responses () | |
load_tags () | |
save ($is_new=true) | |
delete () | |
__get ($key) | |
Data Fields | |
$table_name = 'questions' | |
$columns = array('id', 'user_id', 'category', 'title', 'message', 'post_date', 'last_update', 'vote_count', 'is_public', 'deleted') | |
$cache_keys = array( 'question/#' => 'id', 'questions/user:#' => 'user_id' ) | |
$has_many = array('responses', 'tags') | |
$has_one = array('user') | |
$public_columns = array( 'id', 'short_id', 'user_id', 'category', 'title', 'message', 'post_date', 'last_update', 'vote_count', 'user', 'num_responses', 'responses', 'tags' ) | |
Static Public Attributes | |
static | $categories = array('academic', 'social', 'misc', 'happenings') |
Represents a single question
Definition at line 6 of file question.php.
__get | ( | $ | key | ) |
Reimplemented from ActiveRecord.
Definition at line 110 of file question.php.
delete | ( | ) |
Soft-delete this question (for data archiving purposes)
Definition at line 100 of file question.php.
load_responses | ( | ) |
Load all responses to this question
Definition at line 34 of file question.php.
load_tags | ( | ) |
Load all tags associated with this question
Definition at line 55 of file question.php.
load_user | ( | ) |
Load the user that asked the question
Definition at line 19 of file question.php.
num_responses | ( | ) |
Return the number of responses to this question
Definition at line 47 of file question.php.
save | ( | $ | is_new = true | ) |
Save the question and post a corresponding status update
Definition at line 70 of file question.php.
$cache_keys = array( 'question/#' => 'id', 'questions/user:#' => 'user_id' ) |
Definition at line 9 of file question.php.
$categories = array('academic', 'social', 'misc', 'happenings') [static] |
Definition at line 14 of file question.php.
$columns = array('id', 'user_id', 'category', 'title', 'message', 'post_date', 'last_update', 'vote_count', 'is_public', 'deleted') |
Reimplemented from ActiveRecord.
Definition at line 8 of file question.php.
$has_many = array('responses', 'tags') |
Reimplemented from ActiveRecord.
Definition at line 10 of file question.php.
$has_one = array('user') |
Reimplemented from ActiveRecord.
Definition at line 11 of file question.php.
$public_columns = array( 'id', 'short_id', 'user_id', 'category', 'title', 'message', 'post_date', 'last_update', 'vote_count', 'user', 'num_responses', 'responses', 'tags' ) |
Definition at line 12 of file question.php.
$table_name = 'questions' |
Reimplemented from ActiveRecord.
Definition at line 7 of file question.php.