[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/joomla/database/ -> table.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
License: GNU/GPL, see LICENSE.php
Version: $Id: table.php 14401 2010-01-26 14:10:00Z louis $
File Size: 862 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

JTable:: (24 methods):
  __construct()
  getInstance()
  getDBO()
  setDBO()
  getTableName()
  getKeyName()
  reset()
  bind()
  load()
  check()
  store()
  move()
  getNextOrder()
  reorder()
  canDelete()
  delete()
  checkout()
  checkin()
  hit()
  isCheckedOut()
  save()
  publish()
  toXML()
  addIncludePath()


Class: JTable  - X-Ref

Abstract Table class

Parent classes to all tables.

__construct( $table, $key, &$db )   X-Ref
Object constructor to set table and key field

Can be overloaded/supplemented by the child class

param: string $table name of the table in the db schema relating to child class
param: string $key name of the primary key field in the table
param: object $db JDatabase object

getInstance( $type, $prefix = 'JTable', $config = array()   X-Ref
Returns a reference to the a Table object, always creating it

param: type         $type      The table type to instantiate
param: string     $prefix     A prefix for the table class name. Optional.
param: array        $options Configuration array for model. Optional.
return: database A database object

getDBO()   X-Ref
Get the internal database object

return: object A JDatabase based object

setDBO(&$db)   X-Ref
Set the internal database object

param: object    $db    A JDatabase based object
return: void

getTableName()   X-Ref
Gets the internal table name for the object

return: string

getKeyName()   X-Ref
Gets the internal primary key name

return: string

reset()   X-Ref
Resets the default properties

return: void

bind( $from, $ignore=array()   X-Ref
Binds a named array/hash to this object

Can be overloaded/supplemented by the child class

param: $from    mixed    An associative array or object
param: $ignore    mixed    An array or space separated list of fields not to bind
return: boolean

load( $oid=null )   X-Ref
Loads a row from the database and binds the fields to the object properties

param: mixed    Optional primary key.  If not specifed, the value of current key is used
return: boolean    True if successful

check()   X-Ref
Generic check method

Can be overloaded/supplemented by the child class

return: boolean True if the object is ok

store( $updateNulls=false )   X-Ref
Inserts a new row if id is zero or updates an existing row in the database table

Can be overloaded/supplemented by the child class

param: boolean If false, null object variables are not updated
return: null|string null if successful otherwise returns and error message

move( $dirn, $where='' )   X-Ref
Description

param: $dirn
param: $where

getNextOrder( $where='' )   X-Ref
Returns the ordering value to place a new item last in its group

param: string query WHERE clause for selecting MAX(ordering).

reorder( $where='' )   X-Ref
Compacts the ordering sequence of the selected records

param: string Additional where query to limit ordering to a particular subset of records

canDelete( $oid=null, $joins=null )   X-Ref
Generic check for whether dependancies exist for this object in the db schema

can be overloaded/supplemented by the child class

param: string $msg Error message returned
param: int Optional key index
param: array Optional array to compiles standard joins: format [label=>'Label',name=>'table name',idfield=>'field',joinfield=>'field']
return: true|false

delete( $oid=null )   X-Ref
Default delete method

can be overloaded/supplemented by the child class

return: true if successful otherwise returns and error message

checkout( $who, $oid = null )   X-Ref
Checks out a row

param: integer    The id of the user
param: mixed    The primary key value for the row
return: boolean    True if successful, or if checkout is not supported

checkin( $oid=null )   X-Ref
Checks in a row

param: mixed    The primary key value for the row
return: boolean    True if successful, or if checkout is not supported

hit( $oid=null, $log=false )   X-Ref
Description

param: $oid
param: $log

isCheckedOut( $with = 0, $against = null)   X-Ref
Check if an item is checked out

This function can be used as a static function too, when you do so you need to also provide the
a value for the $against parameter.

param: integer  $with      The userid to preform the match with, if an item is checked out
param: integer  $against     The userid to perform the match against when the function is used as
return: boolean

save( $source, $order_filter='', $ignore='' )   X-Ref
Generic save function

returns: TRUE if completely successful, FALSE if partially or not succesful.
param: array    Source array for binding to class vars
param: string    Filter for the order updating
param: mixed    An array or space separated list of fields not to bind

publish( $cid=null, $publish=1, $user_id=0 )   X-Ref
Generic Publish/Unpublish function

param: array An array of id numbers
param: integer 0 if unpublishing, 1 if publishing
param: integer The id of the user performnig the operation

toXML( $mapKeysToText=false )   X-Ref
Export item list to xml

param: boolean Map foreign keys to text values

addIncludePath( $path=null )   X-Ref
Add a directory where JTable should search for table types. You may
either pass a string or an array of directories.

param: string    A path to search.
return: array    An array with directory elements



Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1