Public Member Functions | Protected Member Functions | Protected Attributes

QueryRecord Class Reference

Inheritance diagram for QueryRecord:
Collaboration diagram for QueryRecord:

List of all members.

Public Member Functions

 __construct ($paramarray=array())
 __get ($name)
 __set ($name, $value)
 __isset ($name)
 exclude_fields ($fields)
 list_excluded_fields ()
 insert ()
 to_array ()
 get_url_args ()
 update ()
 delete ()

Protected Member Functions

 insertRecord ($table)
 updateRecord ($table, $updatekeyfields=array())
 deleteRecord ($table, $updatekeyfields)

Protected Attributes

 $fields = array()
 $newfields = array()
 $unsetfields = array()

Detailed Description

Habari QueryRecord Class

Definition at line 11 of file queryrecord.php.


Constructor & Destructor Documentation

QueryRecord::__construct ( paramarray = array()  ) 

constructor __construct Constructor for the QueryRecord class.

Parameters:
array an associative array of initial field values.

Reimplemented in CronJob, LogEntry, RewriteRule, Tag, Term, User, UserGroup, and Vocabulary.

Definition at line 23 of file queryrecord.php.


Member Function Documentation

QueryRecord::__get ( name  ) 

function __get Handles getting virtual properties for this class

Parameters:
string Name of the property
Returns:
mixed The set value or null if none exists

Reimplemented in CronJob, LogEntry, RewriteRule, Term, User, UserGroup, and Vocabulary.

Definition at line 46 of file queryrecord.php.

QueryRecord::__isset ( name  ) 

Magic isset for QueryRecord, returns whether a property value is set.

Parameters:
string $name The name of the parameter
Returns:
boolean True if the value is set, false if not

Definition at line 83 of file queryrecord.php.

QueryRecord::__set ( name,
value 
)

function __set Handles setting virtual properties for this class

Parameters:
string Name of the property
mixed Value to set it to
Returns:
mixed The set value

Reimplemented in CronJob, and LogEntry.

Definition at line 66 of file queryrecord.php.

QueryRecord::delete (  ) 

This is the public interface that deletes a record

Reimplemented in CronJob, LogEntry, RewriteRule, Term, User, UserGroup, and Vocabulary.

Definition at line 177 of file queryrecord.php.

Referenced by deleteRecord().

QueryRecord::deleteRecord ( table,
updatekeyfields 
) [protected]

function deleteRecord Deletes a record based on the match array

Parameters:
string Table to delete from
array An associative array of field data to match
Returns:
boolean True on success, false if not

Definition at line 189 of file queryrecord.php.

Referenced by Vocabulary::delete(), UserGroup::delete(), Term::delete(), RewriteRule::delete(), Post::delete(), LogEntry::delete(), CronJob::delete(), Block::delete(), User::delete(), and Comment::delete().

QueryRecord::exclude_fields ( fields  ) 

Registers a (list of) fields(s) as being managed exclusively by the database.

Parameters:
mixed A database field name (string) or an array of field names

Definition at line 92 of file queryrecord.php.

Referenced by Vocabulary::__construct(), UserGroup::__construct(), Term::__construct(), RewriteRule::__construct(), Post::__construct(), LogEntry::__construct(), CronJob::__construct(), Block::__construct(), User::__construct(), Comment::__construct(), UserGroup::insert(), and User::insert().

QueryRecord::get_url_args (  ) 

Returns an array with the current field settings

Returns:
array The field settings as they would be saved

Implements URLProperties.

Reimplemented in User.

Definition at line 148 of file queryrecord.php.

QueryRecord::insert (  ) 

This is the public interface that inserts a record

Reimplemented in CronJob, LogEntry, RewriteRule, Term, User, UserGroup, and Vocabulary.

Definition at line 114 of file queryrecord.php.

Referenced by insertRecord().

QueryRecord::insertRecord ( table  )  [protected]

function insertRecord( Inserts this record's fields as a new row

Parameters:
string Table to update
Returns:
boolean True on success, false if not

Again, the parent class's method's signature must match that of the child class's signature

Definition at line 128 of file queryrecord.php.

Referenced by Vocabulary::insert(), UserGroup::insert(), Term::insert(), RewriteRule::insert(), Post::insert(), LogEntry::insert(), CronJob::insert(), Block::insert(), User::insert(), and Comment::insert().

QueryRecord::list_excluded_fields (  ) 

returns an array of fields that should not be included in any database insert operation

Returns:
array an array of field names

Definition at line 106 of file queryrecord.php.

QueryRecord::to_array (  ) 

function to_array Returns an array with the current field settings

Returns:
array The field settings as they would be saved

Definition at line 139 of file queryrecord.php.

Referenced by CronJob::execute(), get_url_args(), Post::get_url_args(), and User::get_url_args().

QueryRecord::update (  ) 

This is the public interface that updates a record

Reimplemented in CronJob, RewriteRule, Term, User, UserGroup, and Vocabulary.

Definition at line 156 of file queryrecord.php.

Referenced by Post::publish(), and updateRecord().

QueryRecord::updateRecord ( table,
updatekeyfields = array() 
) [protected]

function updateRecord Updates this record's fields using the new data

Parameters:
string Table to update
array An associative array of field data to match
Returns:
boolean True on success, false if not

Definition at line 168 of file queryrecord.php.

Referenced by Vocabulary::update(), Term::update(), RewriteRule::update(), Post::update(), CronJob::update(), Block::update(), User::update(), and Comment::update().


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