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

Class: DB_DataObject_Generator

Source Location: /DB_DataObject-1.7.12/DataObject/Generator.php

Class Overview

DB_DataObject_Overload
   |
   --DB_DataObject
      |
      --DB_DataObject_Generator

Generator class


Methods


Inherited Variables

Inherited Methods

Class: DB_DataObject

DB_DataObject::count()
Find the number of results from a simple query
DB_DataObject::database()
Return or assign the name of the current database
DB_DataObject::databaseStructure()
Autoload or manually load the table definitions
DB_DataObject::debug()
Debugger. - use this in your extended classes to output debugging information.
DB_DataObject::debugLevel()
sets and returns debug level eg. DB_DataObject::debugLevel(4);
DB_DataObject::delete()
Deletes items from table which match current objects variables
DB_DataObject::escape()
an escape wrapper around DB->escapeSimple() can be used when adding manual queries or clauses eg.
DB_DataObject::fetch()
fetches next row into this objects var's
DB_DataObject::fetchRow()
fetches a specific row into this object variables
DB_DataObject::find()
find results, either normal or crosstable
DB_DataObject::free()
Free global arrays associated with this object.
DB_DataObject::fromValue()
standard set* implementation.
DB_DataObject::get()
Get a result using key, value.
DB_DataObject::getDatabaseConnection()
Gets the DB object related to an object - so you can use funky peardb stuf with it :)
DB_DataObject::getDatabaseResult()
Gets the DB result object related to the objects active query
  • so you can use funky pear stuff with it - like pager for example.. :)
DB_DataObject::getLink()
return name from related object
DB_DataObject::getLinkArray()
IS THIS SUPPORTED/USED ANYMORE???? return a list of options for a linked table
DB_DataObject::getLinks()
load related objects
DB_DataObject::groupBy()
Adds a group by condition
DB_DataObject::having()
Adds a having clause
DB_DataObject::insert()
Insert the current objects variables into the database
DB_DataObject::joinAdd()
joinAdd - adds another dataobject to this, building a joined query.
DB_DataObject::limit()
Sets the Limit
DB_DataObject::links()
Get the links associate array as defined by the links.ini file.
DB_DataObject::orderBy()
Adds a order by condition
DB_DataObject::query()
sends raw query to database
DB_DataObject::raiseError()
Default error handling is to create a pear error, but never return it.
DB_DataObject::selectAdd()
Adds a select columns
DB_DataObject::selectAs()
Adds multiple Columns or objects to select with formating.
DB_DataObject::setFrom()
Copies items that are in the table definitions from an array or object into the current object will not override key values.
DB_DataObject::staticGet()
An autoloading, caching static get method using key, value (based on get)
DB_DataObject::table()
get/set an associative array of table columns
DB_DataObject::tableName()
Return or assign the name of the current table
DB_DataObject::toArray()
Returns an associative array from the current data (kind of oblivates the idea behind DataObjects, but is usefull if you use it with things like QuickForms.
DB_DataObject::toValue()
standard get* implementation.
DB_DataObject::update()
Updates current objects variables into the database uses the keys() to decide how to update Returns the true on success
DB_DataObject::validate()
validate - override this to set up your validation rules
DB_DataObject::whereAdd()
Adds a condition to the WHERE statement, defaults to AND
DB_DataObject::_call()
Overload Extension support
  • enables setCOLNAME/getCOLNAME
if you define a set/get method for the item it will be called.
DB_DataObject::_loadConfig()
Define the global $_DB_DATAOBJECT['CONFIG'] as an alias to PEAR::getStaticProperty('DB_DataObject','options');

Class: DB_DataObject_Overload

DB_DataObject_Overload::__call()
DB_DataObject_Overload::__sleep()

Class Details

[line 46]
Generator class


[ Top ]


Method Detail

derivedHookFunctions   [line 693]

string derivedHookFunctions( )

hook to add extra methods to all classes

called once for each class, use with $this->table and $this->_definitions[$this->table], to get data out of the current table, use it to add extra methods to the default classes.

  • Return: added to class eg. functions.
  • Access: public

[ Top ]

derivedHookVar   [line 710]

string derivedHookVar( object t &$t, int $padding)

hook for var lines called each time a var line is generated, override to add extra var lines
  • Return: added to class eg. functions.
  • Access: public

Parameters:

object t   &$t   —  containing type,len,flags etc. from tableInfo call
int   $padding   —  padding number of spaces

[ Top ]

fillTableSchema   [line 767]

none fillTableSchema( string $database, string $table)

fillTableSchema - set the database schema on the fly
  • Return: | PEAR::error()
  • Access: public

Parameters:

string   $database   —  database name
string   $table   —  table name of table to create schema info for

[ Top ]

generateClasses   [line 458]

void generateClasses( )


[ Top ]

getProxyFull   [line 731]

object Instance getProxyFull( string $database, string $table)

getProxyFull - create a class definition on the fly and instantate it..

similar to generated files - but also evals the class definitoin code.

  • Return: of class. or PEAR Error
  • Access: public

Parameters:

string   $database   —  database name
string   $table   —  table name of table to create proxy for.

[ Top ]

start   [line 83]

none start( )

The 'starter' = call this to start the process
  • Access: public

[ Top ]

_generateGetters   [line 808]

string _generateGetters( string $input)

Generate getter methods for class definition
  • Access: public

Parameters:

string   $input   —  Existing class contents

[ Top ]

_generateSetters   [line 860]

string _generateSetters( string $input)

Generate setter methods for class definition
  • Access: public

Parameters:

string   $input   —  Existing class contents

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:30:41 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.