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

Class: IBDatabase

Source Location: /interbase.inc.php

Class Overview

Object
   |
   --Persistent
      |
      --Component
         |
         --CustomConnection
            |
            --IBDatabase

IBDatabase provides discrete control over a connection to a single InterBase 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 38]
IBDatabase provides discrete control over a connection to a single InterBase database in a database application.

Use IBDatabase to specify the connection information so IBDataset components can connect to the database.




Tags:



[ Top ]


Class Variables

$_charset = "ISO8859_1"

[line 176]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_connected = "0"

[line 46]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_connection = null

[line 40]



Tags:

access:  public

Type:   mixed


[ Top ]

$_databasename = ""

[line 42]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_debug = 0

[line 41]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_dialect = 3

[line 163]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_dictionary = ""

[line 47]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_dictionaryproperties = false

[line 48]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_host = ""

[line 43]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_username = ""

[line 44]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_userpassword = ""

[line 45]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 214]

IBDatabase __construct( [ $aowner = null])



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

Parameters:

   $aowner  

[ Top ]

method beginTrans [line 63]

void beginTrans( [ $args = array()])



Parameters:

   $args  

[ Top ]

method completeTrans [line 68]

void completeTrans( [ $autocomplete = true])



Parameters:

   $autocomplete  

[ Top ]

method createDictionaryTable [line 424]

boolean createDictionaryTable( )

Creates the dictionary table on the database

Use this method to create the dictionary table on the database you are connection. This method issues the create table command and creates the table with the right structure. You have to connect to the database before use this method and Dictionary property must be set to the tablename.




[ Top ]

method databases [line 455]

array databases( )

Return all the databases using the connection information

This method returns an array with all the databases stored on the server. Not working yet.




[ Top ]

method dbDate [line 199]

void dbDate( $input)



Parameters:

   $input  

[ Top ]

method defaultCharset [line 180]

void defaultCharset( )



[ Top ]

method defaultDebug [line 92]

void defaultDebug( )



[ Top ]

method defaultDialect [line 174]

void defaultDialect( )



[ Top ]

method doConnect [line 280]

void doConnect( )



[ Top ]

method doDisconnect [line 296]

void doDisconnect( )



[ Top ]

method execute [line 230]

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

Executes a query

Use this method to execute an SQL sentence on the database server




Parameters:

string   $query   Query to execute
array   $params   Not used

[ Top ]

method executelimit [line 253]

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

Executes a limited query on the database

Use this method to execute an SQL sentence on the database server using LIMIT clause.




Parameters:

string   $query   Query to execute
integer   $numrows   Rows to get
integer   $offset   First row to start counting
array   $params   Parameters to use on the query

[ Top ]

method extractIndexes [line 358]

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

Return indexes for a table

This method extract the indexes from the table and returns an array with that information.




Parameters:

string   $table   Table name to look for
boolean   $primary   If false, only non-primary keys will be returned

[ Top ]

method getCharset [line 178]

void getCharset( )



[ Top ]

method getConnected [line 79]

void getConnected( )



[ Top ]

method getDatabaseName [line 116]

string getDatabaseName( )

Specifies the name of the database to associate with this database component.

Use DatabaseName to specify the name of the database to use with a database component.

Note: Setting DatabaseName when the Connected property is true requires you to close and reopen the database.




[ Top ]

method getDebug [line 90]

boolean getDebug( )

Sets the debug information provided by the component.

Use this property, when set to true, to get more information about the connection process to address any issue you get.




[ Top ]

method getDialect [line 172]

string getDialect( )

Specifies the dialect to be used when connecting to the server

Reserved for future use.




[ Top ]

method getDictionary [line 103]

string getDictionary( )

Specifies the tablename on this database that holds dictionary information

A dictionary is a set of information about each field of each table, which data-aware components use to show information about the table in a human-readable format, for example, the title for each field, the width for a column, etc




[ Top ]

method getHost [line 126]

string getHost( )

This properties specifies where to find the server to connect to.

Use this property to set the host that runs the server you want to connect to.




[ Top ]

method getOnAfterConnect [line 151]

void getOnAfterConnect( )



[ Top ]

method getOnAfterDisconnect [line 157]

void getOnAfterDisconnect( )



[ Top ]

method getOnBeforeConnect [line 154]

void getOnBeforeConnect( )



[ Top ]

method getOnBeforeDisconnect [line 160]

void getOnBeforeDisconnect( )



[ Top ]

method getUserName [line 137]

string getUserName( )

The username you want to use to connect to the database server.

Set this property with the name of the user you want to use to connect to the database server.




[ Top ]

method getUserPassword [line 148]

string getUserPassword( )

The password for the username you want to use to connect to the database server.

Set this property with the password for the user you want to use to connect to the database server.




[ Top ]

method metaFields [line 50]

void metaFields( $tablename)



Parameters:

   $tablename  

[ Top ]

method param [line 204]

void param( $input)



Parameters:

   $input  

[ Top ]

method prepare [line 184]

void prepare( $query)



Parameters:

   $query  

[ Top ]

method prepareSP [line 194]

void prepareSP( $query)

Prepares a stored procedure for execution

Not finished




Parameters:

   $query  

[ Top ]

method quoteStr [line 209]

void quoteStr( $input)



Parameters:

   $input  

[ Top ]

method readConnected [line 77]

void readConnected( )



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

[ Top ]

method readDictionaryProperties [line 410]

array readDictionaryProperties( )

Array containing all the information in array format about the dictionary

Use this property to provide information about the dictionary but using a PHP array instead a database table.




[ Top ]

method readFieldDictionaryProperties [line 312]

array readFieldDictionaryProperties( string $table, string $field)

Return properties for a field



Parameters:

string   $table   Name of the table to get properties for
string   $field   Name of the field to get properties for

[ Top ]

method setCharset [line 179]

void setCharset( $value)



Parameters:

   $value  

[ Top ]

method setConnected [line 80]

void setConnected( $value)



Parameters:

   $value  

[ Top ]

method setDatabaseName [line 117]

void setDatabaseName( $value)



Parameters:

   $value  

[ Top ]

method setDebug [line 91]

void setDebug( $value)



Parameters:

   $value  

[ Top ]

method setDialect [line 173]

void setDialect( $value)



Parameters:

   $value  

[ Top ]

method setDictionary [line 104]

void setDictionary( $value)



Parameters:

   $value  

[ Top ]

method setHost [line 127]

void setHost( $value)



Parameters:

   $value  

[ Top ]

method setOnAfterConnect [line 152]

void setOnAfterConnect( $value)



Parameters:

   $value  

[ Top ]

method setOnAfterDisconnect [line 158]

void setOnAfterDisconnect( $value)



Parameters:

   $value  

[ Top ]

method setOnBeforeConnect [line 155]

void setOnBeforeConnect( $value)



Parameters:

   $value  

[ Top ]

method setOnBeforeDisconnect [line 161]

void setOnBeforeDisconnect( $value)



Parameters:

   $value  

[ Top ]

method setUserName [line 138]

void setUserName( $value)



Parameters:

   $value  

[ Top ]

method setUserPassword [line 149]

void setUserPassword( $value)



Parameters:

   $value  

[ Top ]

method tables [line 468]

array tables( [ $ttype = false], [ $showSchema = false], [ $mask = false])

Return tables on this database

This method returns an array containing all the table names stored in the database.




Parameters:

   $ttype  
   $showSchema  
   $mask  

[ Top ]

method writeDictionaryProperties [line 411]

void writeDictionaryProperties( $value)



Parameters:

   $value  

[ Top ]


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