Packageindex Classtrees Modulegroups Elementlist Report XML Files

pxdb.content

pxdb_data

pxdb_data

private class pxdb_data

AuthorsHans Lellelid <hans@velum.net>
Version$Revision: 1.4 $

 
Direct known subclasses: pxdb_record, pxdb_confront, pxdb_collection, pxdb_search, pxdb_filter

Public Method Summary

void pxdb_data([ mixed $dt ])
Constructor
void set_show_unapproved(bool $bool)
Sets whether unapproved items should be returned
mixed get_datatype()
Gets the datatype(s).
string get_datatype_list(string $delim)
Returns a $delim-separated list of datatypes.
array get_datatype_array()
Gets the datatypes in array form.
void set_datatype(mixed $dt)
Sets the datatype.
void bind_tpl(object Smarty &$tpl)
Bind your own Smarty object.
boolean bind_auth(object pxdb_auth &$auth)
Bind an authentication object.
string lookup_colname(string $fieldname)
Looks up a dbfield fname based on a passed typesfield identifer.
array get_column_identifiers()
Finds identifiers from typesfields that correspond to a *column* in records table.
array get_identifiers()
Get identifiers from typesfields for current datatype.
void set_user_minimal_columns(array $arr)
Adds user defined fields to the minial columns used to generate SQL when working with more than one datatype
string sql_minimal_columns([ string $alias ])
Gets a list of minimal column names (pxdb reserved columns).
string sql_aliased_columns([ string $alias ])
Gets a list of fields to select from the records table.

Private Method Summary

integer lookup_tfid(string $fieldname, [ mixed $datatype ])
Looks up a typesfields id based on the typesfield uniquename or dbfield name.

Public Field Summary

boolean $debug
Debug switch.
array $errors
Errors array.
mixed $datatype
The datatype(s) for this search class.
object [unknown] $auth
Authentication instance
object [unknown] $tpl
Smarty template instance
boolean $show_unapproved
Whether to allow unapproved results.
object [unknown] $db
ADOConnection instance
array $user_minimal_columns
Array of user-defined minimal columns.

Public Method Details

pxdb_data

public void pxdb_data([ mixed $dt ])

 

Parameter
mixed $dt = >>null<<
Datatype
Returns void


set_show_unapproved

public void set_show_unapproved(bool $bool)

 

Parameter
bool $bool
Returns void


get_datatype

public mixed get_datatype()

 

Returns mixed


get_datatype_list

public string get_datatype_list(string $delim)

  Because a data object may be set up to retrieve data from more than one datatype, $datatype is always an array -- making this method necessary.

Parameter
string $delim
Warning: documentation is missing.
Returns string

delim -separated list of datatype(s).


get_datatype_array

public array get_datatype_array()

 

Returns array


set_datatype

public void set_datatype(mixed $dt)

 

Parameter
mixed $dt
Integer, array of integers, or comma-separated string of integers
Returns void


bind_tpl

public void bind_tpl(object Smarty &$tpl)

 

Parameter
object Smarty &$tpl
The Smarty object to use instead of built-in.
Returns void


bind_auth

public boolean bind_auth(object pxdb_auth &$auth)

  This method allows you to bind an authentication class to an input / commit class. This method checks to make sure that the authentication class provides a recognizable interface.

Parameter
object pxdb_auth &$auth
The authentication object.
Returns boolean

True /false on success.


lookup_colname

public string lookup_colname(string $fieldname)

 

Parameter
string $fieldname
The identifier or dbfield fname.
Returns string

The record column name that corresonds to the specified field.


get_column_identifiers

public array get_column_identifiers()

  Gets all column names from records and corresponding identifiers from typesfields.

Returns array

Array of hash [fname] / [identifier]


get_identifiers

public array get_identifiers()

 

Returns array

? from ADOdb GetCol() method


set_user_minimal_columns

public void set_user_minimal_columns(array $arr)

 

Parameter
array $arr
, array of field names (database fields)
Returns void


sql_minimal_columns

public string sql_minimal_columns([ string $alias ])

 

Parameter
string $alias = >>''<<
Alias to records table.
Returns string

SQL


sql_aliased_columns

public string sql_aliased_columns([ string $alias ])

  This list is first a list of all fields (i.e. '*') and secondly a list of the aliased fields. Note that if there is a field in the aliased list it will override the value from the first list ('*').

Parameter
string $alias = >>''<<
The alias to the records table.
Returns string

The SQL to insert after the SELECT clause.


Private Method Details

lookup_tfid

private integer lookup_tfid(string $fieldname, [ mixed $datatype ])

  This is necessary because we only know the unique name from looking at the form that was submitted.

Parameter
string $fieldname
The fname from dbfields or the oref_relid name.
mixed $datatype = >>null<<
The datatype(s) to use for lookup.
Returns integer

The typesfields ID that corresonds to that uniquename.


Public Field Details

$debug

public boolean $debug

>><<


$errors

public array $errors

>><<


$datatype

public mixed $datatype

>><<


$auth

public object [unknown] $auth

>><<


$tpl

public object [unknown] $tpl

>><<


$show_unapproved

public boolean $show_unapproved

>>false<<


$db

public object [unknown] $db

>><<


$user_minimal_columns

public array $user_minimal_columns

>><<



Packageindex Classtrees Modulegroups Elementlist Report XML Files
Generated on Fri, 28 Apr 2006 19:07:22 -0400 by PHPDoc v1.5 www.phpdoc.de