Packageindex Classtrees Modulegroups Elementlist Report XML Files

pxdb.metadata

pxdb_dbfield

pxdb_basis
   |
  +-- pxdb_dbfield

public class pxdb_dbfield extends pxdb_basis

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

 

Methods inherited from pxdb_basis

pxdb_basis, import, &fetch_datatype, &fetch_relationship, &fetch_dbfield, &fetch_typesfield, &fetch_view, &fetch_viewfield, arr_dbfields, arr_datatypes, arr_parent_datatypes, arr_child_datatypes, arr_relationships, arr_typesfields, arr_views, arr_viewfields, reorder, move, get_groups, get_users

Public Method Summary

void pxdb_dbfield( $id)
Constructor: perform db query to get full row based on the dbfield name or id.
void read()
Updates class vars from the database.
void load()
Load subclass: loads values from global scope into the class.Warning: documentation is missing.
void get_id()

void set_id( $id)

void get_fname()

void set_fname( $fname)

void get_ftype()

void set_ftype( $ftype)

string get_field_type()
Gets the field type.
void get_pick_source()
Get pick source from ftype.
void get_pick_table()
Returns the 2nd component of the pick/pickid column type.
void get_pick_column()
Returns the 3rd parameter in pick/picked column type.
void get_pick_sql()
Returns SQL component of pick/pickid column type.
void get_depending_objects()
Finds objects (datatypes) that are depending on a certain dbfield.
void save()
The broker function for _insert and _update.

Private Method Summary

void get_upload_column()
Returns the field for an upload column type.
void _parts( $str, boolean $param_num)
Break an a string into parts.
boolean _has_table()
Determines whether or not the passed var is the name of a current table.
void _appears_as_table( $table)
This is for checking whether ftype params are tables or not.
boolean _update()
Modify a dbfeld entry.
boolean _change_column(string $old_name, string $new_name, string $new_type, string $table)
Wrapper for column renaming/changing functionality.
boolean _insert()
Add a new dbfeld entry.
void delete(boolean $complete_removal)
Function to delete a dbfield entry, the associated column, and any related tables.

Fields inherited from pxdb_basis

$debug, $errors, $_imported, $_fields, $_old_fields, $method

Public Method Details

pxdb_dbfield

public void pxdb_dbfield( $id)

 

Parameter
$id
Warning: documentation is missing.
Returns void


read

public void read()

 

Returns void


load

public void load()

 

Warning: documentation is missing.

Returns void


get_id

public void get_id()

 

Returns void


set_id

public void set_id( $id)

 

Parameter
$id
Warning: documentation is missing.
Returns void


get_fname

public void get_fname()

 

Returns void


set_fname

public void set_fname( $fname)

 

Parameter
$fname
Warning: documentation is missing.
Returns void


get_ftype

public void get_ftype()

 

Returns void


set_ftype

public void set_ftype( $ftype)

 

Parameter
$ftype
Warning: documentation is missing.
Returns void


get_field_type

public string get_field_type()

  This function returns the first part of the ftype column.

Returns string

The first word of ftype column.


get_pick_source

public void get_pick_source()

  Only applies to dbfields where ftype is pickid or pick Modified: Joe Khoobyar Fixed bugs in regexps.

Returns void


get_pick_table

public void get_pick_table()

 

Returns void


get_pick_column

public void get_pick_column()

 

Returns void


get_pick_sql

public void get_pick_sql()

  Currently this means that it just returns 2nd component, but this definition may expand to include checking to ensure it is SQL, etc.

Returns void


get_depending_objects

public void get_depending_objects()

  This is used, e.g., when wanting to display a popup warning when a certain dbfield is deleted.

Returns void


save

public void save()

  Make sure you call load() before invoking this method if you want it to load vars from global scope.

Returns void


Private Method Details

get_upload_column

private void get_upload_column()

  Currently this means 2nd parameter, but maybe we should also expand this to include verification that this column is an upload type

Returns void


_parts

private void _parts( $str, boolean $param_num)

  This is generic, but in this object is used to break $ftype into components. Modified: Joe Khoobyar Added support for [] quoted sql as an atom (part) in the regexp.

Parameter
$str
Warning: documentation is missing.
boolean $param_num
Warning: documentation is missing.
Returns void


_has_table

private boolean _has_table()

 

Returns boolean


_appears_as_table

private void _appears_as_table( $table)

  Joe Khoobyar Fixed bugs in regexps.

Parameter
$table
Warning: documentation is missing.
Returns void


_update

private boolean _update()

  Checks to make sure that a different (diff id) column doesn't exist with same name.

Returns boolean

True on success; false on error.


_change_column

private boolean _change_column(string $old_name, string $new_name, string $new_type, string $table)

 

Parameter
string $old_name
Original column name
string $new_name
New column name
string $new_type
New column type
string $table
Warning: documentation is missing.
Returns boolean

Success of operation


_insert

private boolean _insert()

  First checks to make sure that the dbfield w/ same name doesn't already exist.

Returns boolean

True on success; false on error.


delete

private void delete(boolean $complete_removal)

  Because of the complexity of the delete() method for dbfields, you cannot call this method without instantiating the class. (i.e. pxdb_dbfield::delete() will not work.)

Parameter
boolean $complete_removal
Warning: documentation is missing.
Returns void



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