DbObject
[ class tree: DbObject ] [ index: DbObject ] [ all elements ]

Class: DbObject

Source Location: /class.DbObject.php

Class Overview




Author(s):

  • tomas@netatbiz.com

Version:

  • 0.1

Copyright:

  • http://www.netatbiz.com

Variables

Methods



Class Details

[line 11]


Tags:

version:  0.1
author:  tomas@netatbiz.com
copyright:  http://www.netatbiz.com


[ Top ]


Class Variables

$data = array()

[line 17]

DbObject singleton instance



Tags:

access:  protected

Type:   DbObject


[ Top ]

$table =  null

[line 23]

DbObject singleton instance



Tags:

access:  protected

Type:   DbObject


[ Top ]



Class Methods


constructor __construct [line 29]

DbObject __construct( [mixed $table = ""])

DbObject constructor



Tags:

var:  table to use


[ Top ]

method deleteById [line 36]

void deleteById( mixed $id)



Tags:

access:  public


[ Top ]

method dump [line 54]

array dump( )

gives the array that represents current db object



Tags:

access:  public


[ Top ]

method get [line 120]

DbObject get( DbCriteria $c, [mixed $fields = '*'])

get single object with certain fields by criteria



Tags:

access:  public


Parameters:

DbCriteria   $c   retrieval criteria
mixed   $fields   string or array of retrieval fields

[ Top ]

method getByID [line 78]

void getByID( mixed $id)



Tags:

access:  public


[ Top ]

method getMultiple [line 100]

array getMultiple( DbCriteria $c, [mixed $fields = '*'])

get multiple objects with certain fields by criteria



Tags:

return:  of DbObjects
access:  public


Parameters:

DbCriteria   $c   retrieval criteria
mixed   $fields   string or array of retrieval fields

[ Top ]

method import [line 88]

void import( [array $array = array()])

imports object parameters with values



Tags:

access:  public


Parameters:

array   $array   array of keys => values

[ Top ]

method query [line 63]

query query( mixed $sql)

direct db query for kamikaze use



Tags:

return:  result
access:  public
static:  


[ Top ]

method save [line 146]

void save( [DbCriteria $c = null])

inserts (if there is no id or criteria) or updates object in db



Tags:

access:  public


Parameters:

DbCriteria   $c   update criteria

[ Top ]

method setTable [line 45]

void setTable( mixed $table)

sets table which will be used



Tags:

var:  table to use
access:  public


[ Top ]

method spawn [line 131]

array spawn( [array $in = array()])

spawns array of DbObjects from multi-array of their properties => values



Tags:

return:  of DbObjects
access:  public


Parameters:

array   $in   input array

[ Top ]

method __get [line 73]

void __get( mixed $property)



Tags:

access:  public


[ Top ]

method __set [line 68]

void __set( mixed $property, mixed $value)



Tags:

access:  public


[ Top ]


Documentation generated on Wed, 19 Jan 2005 20:09:34 +0200 by phpDocumentor 1.3.0RC3