phpDocumentor pivotx
[ class tree: pivotx ] [ index: pivotx ] [ all elements ]

Class: oops_record

Source Location: /modules/module_oops.php

Class oops_record

Descendants
Child Class Description
oops_content base class for entry or page record
oops_category standard class for categories
oops_comment standard class for comments
oops_tag standard class for tags

[ Top ]
Property Summary
mixed   $data  
mixed   $loaded  
mixed   $primarykey_fieldname  
mixed   $tablename  
mixed   $type  

[ Top ]
Method Summary
oops_record   __construct()   Construct a record
void   cache()   Cache this instance using it's own id
array   call_all()   Call every class-method with a specific name
void   call_best()   Call the 'best' (latest,highest in the class hierarchy) method
void   delete()   Delete the current record
void   getLanguageField()   Built-in language field logica
void   get_columns()   Get the column information from the table
void   get_database()   Get a database resource
void   get_id()   Get ID of the record
void   get_jsonp()   Get the contents of the object in JSON format
void   get_no_of_records()   Return the number of records
void   get_object_vars()  
void   get_primarykey_fieldname()   Get the name of the primarykey fieldname
void   have_best()   Have a 'best' call?
void   load()   Load record by primary key
void   loadall()   Load records by a specific field and value
void   loadallby()   Load records by a specific field and value
void   loadby()   Load record by a specific field and value
boolean   loaded()   Returns true if the record has been loaded from a source
void   mark_as_loaded()  
void   register()   register this class to the registry
void   save()   Save the current record
void   search()  
void   set_jsonp()   Put the contents of the object from a JSON feed
void   share_instance()   Internal call for sharing data between records
void   smarty_load()   Smarty standard load
void   smarty_loadall()   Smarty standard load all
void   smarty_search()   Implements searching
void   type()   Get record type
void   weigh()   A dummy weigh function
void   _smarty_loadall_params()   Default smarty loadall params parsing
void   __call()   Make method calls to other classes which also descend from the base class
void   __delete()   Delete the current record
void   __get()   Internal getter
void   __isset()   Internal issetter
void   __load()   Load records as objects via a select sql array
void   __load_array()   Load records as arrays via an select sql array or sql string
void   __save()   Save an associative array to the database
void   __search_records()   Perform a search on the table and weigh/sort the results
void   __set()   Internal setter
void   __transfer_get()   Get the value of a field, but do no conversions on it
void   __transfer_set()   Set the value of a field, but do no conversions on it
void   __unset()   Internal unsetter

[ Top ]
Properties
mixed   $data = false [line 3351]
API Tags:
Access:  protected


Redefined in descendants as:

[ Top ]
mixed   $loaded = false [line 3352]
API Tags:
Access:  protected


[ Top ]
mixed   $primarykey_fieldname = 'uid' [line 3350]
API Tags:
Access:  protected


[ Top ]
mixed   $tablename = false [line 3349]
API Tags:
Access:  protected


[ Top ]
mixed   $type = false [line 3348]
API Tags:
Access:  protected


[ Top ]
Methods
Constructor __construct  [line 3358]

  oops_record __construct( $type, $tablename  )

Construct a record

Parameters:
   $type: 
   $tablename: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
cache  [line 3490]

  void cache( )

Cache this instance using it's own id


API Tags:
Access:  public


[ Top ]
call_all  [line 4018]

  array call_all( )

Call every class-method with a specific name

All the arguments passed to this call are also arguments to the method.

  • except the first argument is the name of the method to call
  • the first argument to the method is always an array, which gets passed to the next method call, etc, etc. in the end its returned


API Tags:
Return:  return array or false if there were no classes
Access:  public


[ Top ]
call_best  [line 4064]

  void call_best( )

Call the 'best' (latest,highest in the class hierarchy) method


API Tags:
Access:  public


[ Top ]
delete  [line 3910]

  void delete( )

Delete the current record


API Tags:
Access:  public


[ Top ]
getLanguageField  [line 3922]

  void getLanguageField( $name, [ $language = false]  )

Built-in language field logica

Parameters:
   $name: 
   $language: 

API Tags:
Access:  protected


[ Top ]
get_columns  [line 3392]

  void get_columns( )

Get the column information from the table


API Tags:
Access:  public


[ Top ]
get_database  [line 3627]

  void get_database( )

Get a database resource


API Tags:
Access:  protected


[ Top ]
get_id  [line 3613]

  void get_id( )

Get ID of the record

Example:

  1. [[$entry->get_id()]]


API Tags:
Access:  public


[ Top ]
get_jsonp  [line 3517]

  void get_jsonp( )

Get the contents of the object in JSON format


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
get_no_of_records  [line 3798]

  void get_no_of_records( )

Return the number of records


API Tags:
Access:  public


[ Top ]
get_object_vars  [line 3456]

  void get_object_vars( )


API Tags:
Access:  public


[ Top ]
get_primarykey_fieldname  [line 3383]

  void get_primarykey_fieldname( )

Get the name of the primarykey fieldname


API Tags:
Access:  public


[ Top ]
have_best  [line 4049]

  void have_best( $name  )

Have a 'best' call?

Parameters:
   $name: 

API Tags:
Access:  public


[ Top ]
load  [line 3789]

  void load( $id  )

Load record by primary key

Parameters:
   $id: 

API Tags:
Access:  public


[ Top ]
loadall  [line 3729]

  void loadall( [ $args = array()]  )

Load records by a specific field and value

Parameters:
   $args: 

API Tags:
Access:  public


[ Top ]
loadallby  [line 3752]

  void loadallby( $by, $value, [ $operator = '=']  )

Load records by a specific field and value

Parameters:
   $by: 
   $value: 
   $operator: 

API Tags:
Access:  public


[ Top ]
loadby  [line 3770]

  void loadby( $by, $value, [ $operator = '=']  )

Load record by a specific field and value

Parameters:
   $by: 
   $value: 
   $operator: 

API Tags:
Access:  public


[ Top ]
loaded  [line 3508]

  boolean loaded( )

Returns true if the record has been loaded from a source

Example:

  1. [[if $entry->loaded()]]geladen[[/if]]


API Tags:
Return:  true if the record has been loaded from a source
Access:  public


[ Top ]
mark_as_loaded  [line 3474]

  void mark_as_loaded( )


API Tags:
Access:  public


[ Top ]
register  [line 3483]

  void register( )

register this class to the registry


API Tags:
Access:  public


[ Top ]
save  [line 3859]

  void save( )

Save the current record


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
search  [line 4332]

  void search( $q, [ $params = array()]  )

Parameters:
   $q: 
   $params: 

API Tags:
Access:  public


[ Top ]
set_jsonp  [line 3529]

  void set_jsonp( $jsonp  )

Put the contents of the object from a JSON feed

Parameters:
   $jsonp: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
share_instance  [line 3465]

  void share_instance( $vars  )

Internal call for sharing data between records

Parameters:
   $vars: 

API Tags:
Access:  public


[ Top ]
smarty_load  [line 4262]

  void smarty_load( $params, &$smarty  )

Smarty standard load

A simple basic load call to load a single record.

<dl> <dt>assign</dt><dd>assign result to this variable</dd> <dt>by_<em>column</em></dt><dd>value must be exactly this value</dd> <dt>eq_<em>column</em></dt><dd>value must be exactly this value</dd> <dt>ne_<em>column</em></dt><dd>value must not be this value</dd> <dt>lt_<em>column</em></dt><dd>value must be less then this value</dd> <dt>lte_<em>column</em></dt><dd>value must be less than or equal to this value</dd> <dt>gt_<em>column</em></dt><dd>value must be greater than this value</dd> <dt>gte_<em>column</em></dt><dd>value must be greater than or equal to this value</dd> <dt>like_<em>column</em></dt><dd>value must be like this value</dd> <dt>limit</dt><dd>limit the number of results to this value</dd> <dt>order_by</dt><dd>order the results on these columns</dd> <dt>group_by</dt><dd>group the results using these columns</dd> <dt>sql_offset</dt><dd>set the sql offset in the sql statement</dd> <dt>sql_limit</dt><dd>limit the number of results in the sql statement</dd> <dt>random<dt><dd>set to '1' to choose a random result</dd> </dl>

Example:

  1. [[oops_*entry*_load assign='*entry*' by_uid=2]]

Example:
  1. [[oops_*entry*_load assign='*entry*' by_uri='about']]

Parameters:
   $params: 
   &$smarty: 

API Tags:
Access:  public


[ Top ]
smarty_loadall  [line 4305]

  void smarty_loadall( $params, &$smarty  )

Smarty standard load all

A simple basic load call to load specific records.

<dl> <dt>assign</dt><dd>assign result to this variable</dd> <dt>by_<em>column</em></dt><dd>value must be exactly this value</dd> <dt>eq_<em>column</em></dt><dd>value must be exactly this value</dd> <dt>ne_<em>column</em></dt><dd>value must not be this value</dd> <dt>lt_<em>column</em></dt><dd>value must be less then this value</dd> <dt>lte_<em>column</em></dt><dd>value must be less than or equal to this value</dd> <dt>gt_<em>column</em></dt><dd>value must be greater than this value</dd> <dt>gte_<em>column</em></dt><dd>value must be greater than or equal to this value</dd> <dt>like_<em>column</em></dt><dd>value must be like this value</dd> <dt>limit</dt><dd>limit the number of results to this value</dd> <dt>order_by</dt><dd>order the results on these columns</dd> <dt>group_by</dt><dd>group the results using these columns</dd> <dt>sql_offset</dt><dd>set the sql offset in the sql statement</dd> <dt>sql_limit</dt><dd>limit the number of results in the sql statement</dd> <dt>random<dt><dd>set to '1' to choose a random result</dd> <dt>size</dt><dd>size of the pages used for pagination (don't use limit anymore)</dd> <dt>paginate</dt><dd>set the GET variable used for the pagination</dd> </dl>

Example:

  1. [[oops_*entry*_loadall assign='*entry*s']]

Example:
  1. [[oops_*entry*_loadall assign='*entry*s' order_by='publish_date']]

Parameters:
   $params: 
   &$smarty: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
smarty_search  [line 4386]

  void smarty_search( $params, &$smarty  )

Implements searching

<dl> <dt>q</dt><dd>search string</dd> </dl>

Parameters:
   $params: 
   &$smarty: 

API Tags:
Access:  public


[ Top ]
type  [line 3374]

  void type( )

Get record type


API Tags:
Access:  public


[ Top ]
weigh  [line 3947]

  void weigh( $args  )

A dummy weigh function

Parameters:
   $args: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
_smarty_loadall_params  [line 4100]

  void _smarty_loadall_params( $params, [ $args = array()]  )

Default smarty loadall params parsing

Parameters:
   $params: 
   $args: 

API Tags:
Access:  protected


Redefined in descendants as:

[ Top ]
__call  [line 3961]

  void __call( $name, $args  )

Make method calls to other classes which also descend from the base class

Parameters:
   $name: 
   $args: 

API Tags:
Access:  public


[ Top ]
__delete  [line 3884]

  void __delete( )

Delete the current record

Actual delete call


API Tags:
Access:  public


[ Top ]
__get  [line 3581]

  void __get( $name  )

Internal getter

Parameters:
   $name: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
__isset  [line 3604]

  void __isset( $name  )

Internal issetter

Parameters:
   $name: 

API Tags:
Access:  public


[ Top ]
__load  [line 3690]

  void __load( $classname, $select_sql, &$data  )

Load records as objects via a select sql array

Parameters:
   $classname: 
   $select_sql: 
   &$data: 

API Tags:
Access:  protected


[ Top ]
__load_array  [line 3636]

  void __load_array( $select_sql, &$data  )

Load records as arrays via an select sql array or sql string

Parameters:
   $select_sql: 
   &$data: 

API Tags:
Access:  protected


Redefined in descendants as:

[ Top ]
__save  [line 3813]

  void __save( $tablename, $primarykey_fieldname, &$data  )

Save an associative array to the database

Parameters:
   $tablename: 
   $primarykey_fieldname: 
   &$data: 

API Tags:
Access:  protected


[ Top ]
__search_records  [line 4325]

  void __search_records( $q, [ $params = array()]  )

Perform a search on the table and weigh/sort the results

Parameters:
   $q: 
   $params: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
__set  [line 3572]

  void __set( $name, $value  )

Internal setter

Parameters:
   $name: 
   $value: 

API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
__transfer_get  [line 3560]

  void __transfer_get( $name  )

Get the value of a field, but do no conversions on it

Parameters:
   $name: 

API Tags:
Access:  public


[ Top ]
__transfer_set  [line 3546]

  void __transfer_set( $name, $value  )

Set the value of a field, but do no conversions on it

Parameters:
   $name: 
   $value: 

API Tags:
Access:  public


[ Top ]
__unset  [line 3593]

  void __unset( $name  )

Internal unsetter

Parameters:
   $name: 

API Tags:
Access:  public


[ Top ]

Documentation generated on Thu, 17 May 2012 01:07:21 +0200 by phpDocumentor 1.4.3