Campustream 1.0
A social network MQP for WPI
ActiveRecord Class Reference
Inheritance diagram for ActiveRecord:
Eventmeta_Model Newscomment_Model Newsevent_Model Question_Model Questiontag_Model Relationship_Model Response_Model Status_Model Statuscomment_Model User_Model Userfacebook_Model Usertwitter_Model

Public Member Functions

 __construct ($data=null)
 delete ($skip_delete=false)
 is_saved ()
 is_loaded ()
 validate ()
 add_relationship ($class, $object)
 save ()
 subscribe ($subscriber)
 notify_subscribers ()
 __isset ($key)
 __get ($key)
 __set ($key, $value)
 __sleep ()
 __wakeup ()
 limited_object ($condensed=true)
 to_json ()
 to_jsonp ()
 to_xml ()

Static Public Member Functions

static model_to_table_name ($class)
static table_to_model_name ($class)
static depluralize ($word)
static NOW ()
static NULL ($test=null)
static prepare ($clause)
static find_all ($class, $clause, $pk_hint='id')
static find ($class, $clause, $pk_hint='id')
static convert_rs ($format, $array, $root, $tag)
static rs_to_json ($array, $root)
static rs_to_xml ($array, $root, $tag)

Data Fields

 $table_name = null
 $columns = null
 $primary_key = 'id'
 $primary_key_value = null
 $auto_increment = true
 $has_many = array()
 $has_one = array()
 $belongs_to = array()
const _UPDATE = 'UPDATE `%s` SET %s WHERE %s;'
const _INSERT = 'INSERT INTO `%s` (%s) VALUES (%s);'
const _SELECT = 'SELECT * FROM `%s` WHERE %s LIMIT 1'
const _DELETE = 'DELETE FROM `%s` WHERE %s LIMIT 1'

Static Public Attributes

static $NOW = null
static $NULL = null

Protected Attributes

 $_data = null
 $_relationships = array()
 $_dirty = false
 $_new = true
 $_orig_pk = null
 $_subscribers = array()

Detailed Description

Definition at line 3 of file activerecord.php.


Constructor & Destructor Documentation

__construct ( data = null)

Definition at line 245 of file activerecord.php.


Member Function Documentation

__isset ( key)

Definition at line 441 of file activerecord.php.

__set ( key,
value 
)

Reimplemented in User_Model.

Definition at line 456 of file activerecord.php.

__sleep ( )

Definition at line 468 of file activerecord.php.

__wakeup ( )

Definition at line 478 of file activerecord.php.

add_relationship ( class,
object 
)

Definition at line 305 of file activerecord.php.

static convert_rs ( format,
array,
root,
tag 
) [static]

Definition at line 576 of file activerecord.php.

delete ( skip_delete = false)

Definition at line 280 of file activerecord.php.

static depluralize ( word) [static]

Definition at line 47 of file activerecord.php.

static find ( class,
clause,
pk_hint = 'id' 
) [static]

Definition at line 139 of file activerecord.php.

static find_all ( class,
clause,
pk_hint = 'id' 
) [static]

Definition at line 119 of file activerecord.php.

is_loaded ( )

Definition at line 296 of file activerecord.php.

is_saved ( )

Definition at line 294 of file activerecord.php.

limited_object ( condensed = true)

Definition at line 485 of file activerecord.php.

static model_to_table_name ( class) [static]

Definition at line 37 of file activerecord.php.

notify_subscribers ( )

Definition at line 334 of file activerecord.php.

static NOW ( ) [static]

Definition at line 90 of file activerecord.php.

static NULL ( test = null) [static]

Definition at line 97 of file activerecord.php.

static prepare ( clause) [static]

Definition at line 115 of file activerecord.php.

static rs_to_json ( array,
root 
) [static]

Definition at line 584 of file activerecord.php.

static rs_to_xml ( array,
root,
tag 
) [static]

Definition at line 597 of file activerecord.php.

save ( )

Reimplemented in Statuscomment_Model, Userfacebook_Model, and Usertwitter_Model.

Definition at line 319 of file activerecord.php.

subscribe ( subscriber)

Definition at line 330 of file activerecord.php.

static table_to_model_name ( class) [static]

Definition at line 42 of file activerecord.php.

to_json ( )

Definition at line 526 of file activerecord.php.

to_jsonp ( )

Definition at line 533 of file activerecord.php.

to_xml ( )

Definition at line 548 of file activerecord.php.

validate ( )

Definition at line 300 of file activerecord.php.


Field Documentation

$_data = null [protected]

Definition at line 10 of file activerecord.php.

$_dirty = false [protected]

Definition at line 13 of file activerecord.php.

$_new = true [protected]

Definition at line 14 of file activerecord.php.

$_orig_pk = null [protected]

Definition at line 15 of file activerecord.php.

$_relationships = array() [protected]

Definition at line 11 of file activerecord.php.

$_subscribers = array() [protected]

Definition at line 17 of file activerecord.php.

$auto_increment = true

Definition at line 26 of file activerecord.php.

$belongs_to = array()

Definition at line 29 of file activerecord.php.

$NOW = null [static]

Definition at line 5 of file activerecord.php.

$NULL = null [static]

Definition at line 6 of file activerecord.php.

$primary_key = 'id'

Definition at line 24 of file activerecord.php.

$primary_key_value = null

Definition at line 25 of file activerecord.php.

const _DELETE = 'DELETE FROM `%s` WHERE %s LIMIT 1'

Definition at line 34 of file activerecord.php.

const _INSERT = 'INSERT INTO `%s` (%s) VALUES (%s);'

Definition at line 32 of file activerecord.php.

const _SELECT = 'SELECT * FROM `%s` WHERE %s LIMIT 1'

Definition at line 33 of file activerecord.php.

const _UPDATE = 'UPDATE `%s` SET %s WHERE %s;'

Definition at line 31 of file activerecord.php.


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