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 ()
 get_raw_field ($name)
 to_array ()
 to_json ()
 jsonSerialize ()
 get_url_args ()
 update ()
 delete ()
 modify ($paramarray=array())

Protected Member Functions

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

Protected Attributes

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

Detailed Description

Habari QueryRecord Class

Definition at line 13 of file queryrecord.php.


Constructor & Destructor Documentation

QueryRecord::__construct ( paramarray = array()  ) 

constructor __construct Constructor for the QueryRecord class.

Parameters:
array $paramarray an associative array of initial field values.

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

Definition at line 25 of file queryrecord.php.


Member Function Documentation

QueryRecord::__get ( name  ) 

function __get Handles getting virtual properties for this class

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

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

Definition at line 48 of file queryrecord.php.

Referenced by get_raw_field().

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 91 of file queryrecord.php.

QueryRecord::__set ( name,
value 
)

function __set Handles setting virtual properties for this class

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

Reimplemented in CronJob, and LogEntry.

Definition at line 68 of file queryrecord.php.

QueryRecord::delete (  ) 

This is the public interface that deletes a record

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

Definition at line 275 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 Table to delete from
array $updatekeyfields An associative array of field data to match
Returns:
boolean True on success, false if not

Definition at line 287 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 $fields A database field name (string) or an array of field names

Definition at line 100 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_raw_field ( name  ) 

A field accessor that doesn't filter, for use in plugins that filter field values

Parameters:
string $name Name of the field to get
Returns:
mixed Value of the field, unfiltered

Definition at line 132 of file queryrecord.php.

QueryRecord::get_url_args (  ) 

Returns an array with the current field settings

Returns:
array The field settings as they would be saved

Implements URLProperties.

Definition at line 217 of file queryrecord.php.

QueryRecord::insert (  ) 

This is the public interface that inserts a record

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

Definition at line 122 of file queryrecord.php.

Referenced by insertRecord().

QueryRecord::insertRecord ( table,
schema = null 
) [protected]

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

Parameters:
string $table Table to update, use table name without prefix and without braces
null|array $schema An array describing the schema of auxiliary tables
Returns:
integer The inserted record id 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 147 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::jsonSerialize (  ) 

Implements JsonSerializable, only available in PHP 5.4 :(

Returns:
string

Definition at line 206 of file queryrecord.php.

Referenced by to_json().

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 114 of file queryrecord.php.

QueryRecord::modify ( paramarray = array()  ) 

This is the public interface to update a record with an array

Definition at line 295 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 187 of file queryrecord.php.

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

QueryRecord::to_json (  ) 

Convert record data to json Returns a string with the current field values in JSON format

Returns:
string The field settings as they would be saved in JSON

Definition at line 197 of file queryrecord.php.

Referenced by Posts::to_json().

QueryRecord::update (  ) 

This is the public interface that updates a record

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

Definition at line 225 of file queryrecord.php.

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

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

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

Parameters:
string $table Table to update, use table name without prefix and without braces
array $updatekeyfields An associative array of field data to match
null|array $schema An array describing the schema of auxiliary tables
Returns:
boolean True on success, false if not

Definition at line 238 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: