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

Class: Database

Source Location: /dbtables.inc.php

Class Overview

Object
   |
   --Persistent
      |
      --Component
         |
         --CustomConnection
            |
            --Database

Database provides discrete control over a connection to a single database in a database application.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: CustomConnection

CustomConnection::__construct()
CustomConnection::BeginTrans()
Begins a new transaction against the database server.
CustomConnection::Close()
Closes the connection.
CustomConnection::CompleteTrans()
Permanently stores updates, insertions, and deletions of data associated with
CustomConnection::DBDate()
Returns a date formatted to be used on this database, depending on the type
CustomConnection::defaultClients()
CustomConnection::defaultConnected()
CustomConnection::defaultDataSets()
CustomConnection::defaultOnAfterConnect()
CustomConnection::defaultOnAfterDisconnect()
CustomConnection::defaultOnBeforeConnect()
CustomConnection::defaultOnBeforeDisconnect()
CustomConnection::defaultOnCustomConnect()
CustomConnection::defaultOnLogin()
CustomConnection::DoConnect()
Provides the interface for a method that opens a connection.
CustomConnection::DoDisconnect()
Provides the interface for a method that terminates the connection.
CustomConnection::getOnCustomConnect()
CustomConnection::loaded()
CustomConnection::MetaFields()
Returns the fieldnames for the table
CustomConnection::Open()
Opens the connection.
CustomConnection::Param()
Returns a parameter formatted depending on the database type
CustomConnection::Prepare()
Sends a query to the server for optimization prior to execution.
CustomConnection::QuoteStr()
Quote a string depending on the database type
CustomConnection::readClients()
Returns the clients of this database
CustomConnection::readConnected()
Determines whether a connection has been established to the remote source of data.
CustomConnection::readDataSets()
Provides an indexed array of all active datasets for a database component.
CustomConnection::readOnAfterConnect()
Occurs after a connection is established.
CustomConnection::readOnAfterDisconnect()
Occurs after the connection closes.
CustomConnection::readOnBeforeConnect()
Occurs immediately before establishing a connection.
CustomConnection::readOnBeforeDisconnect()
Occurs immediately before the connection closes.
CustomConnection::readOnLogin()
Occurs when an application connects to a database.
CustomConnection::SendConnectEvent()
Send a connect event to all the datasets, both for connecting and disconnecting
CustomConnection::setOnCustomConnect()
CustomConnection::writeClients()
CustomConnection::writeConnected()
CustomConnection::writeDataSets()
CustomConnection::writeOnAfterConnect()
CustomConnection::writeOnAfterDisconnect()
CustomConnection::writeOnBeforeConnect()
CustomConnection::writeOnBeforeDisconnect()
CustomConnection::writeOnLogin()

Class: Component

Component::__construct()
Component constructor
Component::ajaxCall()
Dumps the javascript code to make an ajax call to the server.
Component::callEvent()
Calls a server event.
Component::defaultName()
Component::defaultTag()
Component::dumpChildrenFormItems()
This method is called by the page just after dumping the starting form tag.
Component::dumpChildrenHeaderCode()
Dumps the header code for all the children
Component::dumpChildrenJavascript()
Dumps the javascript code for all the children
Component::dumpFormItems()
Dumps code just after the form tag, useful to dump hidden fields for state retrieving for non visible components
Component::dumpHeaderCode()
Dumps header code required
Component::dumpHiddenKeyFields()
Dumps hidden field values for the key record
Component::dumpJavascript()
Dumps the javascript code needed by this component
Component::dumpJSEvent()
Dumps javascript code for an event
Component::fixupProperty()
Resolves the right reference to an object property
Component::generateAjaxEvent()
Returns the javascript code to generate an ajax call.
Component::getName()
Specifies the name for the component. The name is used as an identifier and should be unique.
Component::getTag()
A versatile property of every Component that can be used in any way you want
Component::hasValidDataField()
Returns true if a valid data field is attached to the component
Component::init()
Initializes a component
Component::insertComponent()
Inserts a component into the component's collection
Component::loaded()
Initializes the component after the form file has been read into memory.
Component::loadedChildren()
Calls childrens loaded
Component::loadResource()
Loads this component from a string
Component::preinit()
Method called before init()
Component::readAccessibility()
Provides accessibility info to the embedded RPC engine.
Component::readComponentCount()
Indicates the number of components owned by the component.
Component::readComponents()
Lists all the components owned by this component.
Component::readControlState()
A flag to know the state of the control, csLoading, csDesigning
Component::readDataFieldValue()
This property returns the value of the datafield if any.
Component::readFromResource()
Reads a component from a resource file
Component::readNamePath()
Specifies the path to uniquely identify a component, qualified by the owner when required.
Component::readOwner()
Indicates the component that is responsible for streaming and freeing this component.
Component::removeComponent()
Removes a component from the component's collection
Component::serializeChildren()
Serializes all children
Component::setName()
Component::setTag()
Component::unserializeChildren()
Unserializes all children by calling unserialize for all the components
Component::updateDataField()
Updates the field on the dataset attached, if any
Component::writeControlState()

Class: Persistent

Persistent::allowserialize()
This method provides an opportunity for the component developer to prevent the serialization/unserialization of a property.
Persistent::assign()
Assigns the source properties to this object.
Persistent::assignError()
Raises an assignation error.
Persistent::assignTo()
Assigns this object to another object.
Persistent::inSession()
This method determines if this object exists in the current session.
Persistent::readNamePath()
Used to serialize/unserialize. It returns the full path to identify this component.
Persistent::readOwner()
Owner of the component.
Persistent::serialize()
Stores this object into the session.
Persistent::unserialize()
This method uses PHP reflection to iterate through published properties (the ones starting with get) and retrieve the properties stored by a previous serialize() call.

Class: Object

Object::__construct()
Constructs an object and initializes its data before the object is first used.
Object::className()
Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument).
Object::classNameIs()
Determines whether an object is of a specific type.
Object::classParent()
Returns the type of the immediate ancestor of a class.
Object::inheritsFrom()
Determines the relationship of two object types.
Object::methodExists()
Check if a method exists declared on this object instance.
Object::readProperty()
Reads a property from the streams
Object::__get()
To virtualize properties
Object::__set()
To virtualize properties

Class Details

[line 41]
Database provides discrete control over a connection to a single database in a database application.

Use Database to specify the connection information so dataset components can connect to the database.




Tags:



[ Top ]


Class Variables

$_charset = ""

[line 67]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_connected = 0

[line 50]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_connection = null

[line 43]



Tags:

access:  public

Type:   mixed


[ Top ]

$_databasename = ""

[line 46]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_debug = 0

[line 44]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_dictionary = ""

[line 51]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_dictionaryproperties = false

[line 52]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_drivername = "mysql"

[line 45]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_host = ""

[line 47]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_username = ""

[line 48]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_userpassword = ""

[line 49]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 139]

Database __construct( [ $aowner = null])



Overrides CustomConnection::__construct() (parent method not documented)

Parameters:

   $aowner  

[ Top ]

method BeginTrans [line 83]

void BeginTrans( )



Overrides CustomConnection::BeginTrans() (Begins a new transaction against the database server.)

[ Top ]

method CompleteTrans [line 88]

void CompleteTrans( [ $autocomplete = true])



Overrides CustomConnection::CompleteTrans() (Permanently stores updates, insertions, and deletions of data associated with)

Parameters:

   $autocomplete  

[ Top ]

method createDictionaryTable [line 374]

boolean createDictionaryTable( )

Creates the dictionary table on the database



Tags:

return:  True if dictionary table has been created correctly


[ Top ]

method databases [line 436]

array databases( )

Return databases with this connection information



Tags:

return:  Table names for this database


[ Top ]

method DBDate [line 124]

void DBDate( $input)



Overrides CustomConnection::DBDate() (Returns a date formatted to be used on this database, depending on the type)

Parameters:

   $input  

[ Top ]

method defaultCharset [line 79]

void defaultCharset( )



[ Top ]

method defaultDataBaseName [line 195]

void defaultDataBaseName( )



[ Top ]

method defaultDebug [line 166]

void defaultDebug( )



[ Top ]

method defaultDictionary [line 187]

void defaultDictionary( )



[ Top ]

method defaultDriverName [line 177]

void defaultDriverName( )



[ Top ]

method defaultHost [line 202]

void defaultHost( )



[ Top ]

method defaultUserName [line 210]

void defaultUserName( )



[ Top ]

method defaultUserPassword [line 217]

void defaultUserPassword( )



[ Top ]

method DoConnect [line 256]

void DoConnect( )



Overrides CustomConnection::DoConnect() (Provides the interface for a method that opens a connection.)

[ Top ]

method DoDisconnect [line 292]

void DoDisconnect( )



Overrides CustomConnection::DoDisconnect() (Provides the interface for a method that terminates the connection.)

[ Top ]

method execute [line 225]

object ResultSet execute( string $query, [ $params = array()])

Executes a query



Tags:

return:  object to work with


Parameters:

string   $query   Query to execute
   $params  

[ Top ]

method executelimit [line 245]

object Resultset executelimit( string $query, integer $numrows, integer $offset, [array $params = array()])

Executes a limited query



Tags:

return:  object to work with


Parameters:

string   $query   SQL sentence to execute
integer   $numrows   Numrows to retrieve
integer   $offset   Starting row to retrieve
array   $params   Parameters to use on the query

[ Top ]

method extractIndexes [line 355]

array extractIndexes( string $table, [boolean $primary = FALSE])

Return indexes for a table



Tags:

return:  Array with indexes from that table


Parameters:

string   $table   Name of the table to get indexes
boolean   $primary   If true, also get primary indexes

[ Top ]

method getCharset [line 77]

string getCharset( )

Determines the character set to be used when opening a connection

Use this property to specify the charset to use when opening a connection, the value for this property varies depending on the database provider.




[ Top ]

method getConnected [line 153]

void getConnected( )



[ Top ]

method getDatabaseName [line 193]

string getDatabaseName( )

Specifies the name of the database you want to access



[ Top ]

method getDebug [line 164]

boolean getDebug( )

Specifies if the database is in debug mode or not

Use this property if you want to get more information when a problem arises connecting to the database.




[ Top ]

method getDictionary [line 185]

string getDictionary( )

Specifies the dictionary table you want to use



Tags:



[ Top ]

method getDriverName [line 175]

string getDriverName( )

Specifies the type of database you want to access



Tags:



[ Top ]

method getHost [line 200]

string getHost( )

Specifies the host where your database resides



[ Top ]

method getOnAfterConnect [line 93]

void getOnAfterConnect( )



[ Top ]

method getOnAfterDisconnect [line 99]

void getOnAfterDisconnect( )



[ Top ]

method getOnBeforeConnect [line 96]

void getOnBeforeConnect( )



[ Top ]

method getOnBeforeDisconnect [line 102]

void getOnBeforeDisconnect( )



[ Top ]

method getUserName [line 208]

string getUserName( )

Specifies the username used to acces the database



[ Top ]

method getUserPassword [line 215]

string getUserPassword( )

Specifies the password to access the database



[ Top ]

method MetaFields [line 54]

void MetaFields( $tablename)



Overrides CustomConnection::MetaFields() (Returns the fieldnames for the table)

Parameters:

   $tablename  

[ Top ]

method Param [line 129]

void Param( $input)



Overrides CustomConnection::Param() (Returns a parameter formatted depending on the database type)

Parameters:

   $input  

[ Top ]

method Prepare [line 106]

void Prepare( $query)



Overrides CustomConnection::Prepare() (Sends a query to the server for optimization prior to execution.)

Parameters:

   $query  

[ Top ]

method PrepareSP [line 119]

void PrepareSP( string $query)

Prepares the Stored Procedure to be executed

Use this method before execute several times a stored procedure to get some performance gain.




Parameters:

string   $query   Stored Procedure query to be prepared

[ Top ]

method QuoteStr [line 134]

void QuoteStr( $input)



Overrides CustomConnection::QuoteStr() (Quote a string depending on the database type)

Parameters:

   $input  

[ Top ]

method readConnected [line 152]

boolean readConnected( )

Specifies if the database is connected or not



Tags:



Overrides CustomConnection::readConnected() (Determines whether a connection has been established to the remote source of data.)

[ Top ]

method readDictionaryProperties [line 365]

array readDictionaryProperties( )

Return an array with dictionary properties



[ Top ]

method readFieldDictionaryProperties [line 308]

array readFieldDictionaryProperties( string $table, string $field)

Return properties for a field



Tags:

return:  Array with properties for that field table


Parameters:

string   $table   Name of the table to query for
string   $field   Name of the field of that table

[ Top ]

method setCharset [line 78]

void setCharset( $value)



Parameters:

   $value  

[ Top ]

method setConnected [line 154]

void setConnected( $value)



Parameters:

   $value  

[ Top ]

method setDatabaseName [line 194]

void setDatabaseName( $value)



Parameters:

   $value  

[ Top ]

method setDebug [line 165]

void setDebug( $value)



Parameters:

   $value  

[ Top ]

method setDictionary [line 186]

void setDictionary( $value)



Parameters:

   $value  

[ Top ]

method setDriverName [line 176]

void setDriverName( $value)



Parameters:

   $value  

[ Top ]

method setHost [line 201]

void setHost( $value)



Parameters:

   $value  

[ Top ]

method setOnAfterConnect [line 94]

void setOnAfterConnect( $value)



Parameters:

   $value  

[ Top ]

method setOnAfterDisconnect [line 100]

void setOnAfterDisconnect( $value)



Parameters:

   $value  

[ Top ]

method setOnBeforeConnect [line 97]

void setOnBeforeConnect( $value)



Parameters:

   $value  

[ Top ]

method setOnBeforeDisconnect [line 103]

void setOnBeforeDisconnect( $value)



Parameters:

   $value  

[ Top ]

method setUserName [line 209]

void setUserName( $value)



Parameters:

   $value  

[ Top ]

method setUserPassword [line 216]

void setUserPassword( $value)



Parameters:

   $value  

[ Top ]

method tables [line 422]

array tables( )

Return tables on this database



Tags:

return:  Table names for this database


[ Top ]

method writeDictionaryProperties [line 366]

void writeDictionaryProperties( $value)



Parameters:

   $value  

[ Top ]


Documentation generated on Sat, 13 Jun 2009 10:51:27 -0700 by phpDocumentor 1.4.1