KjwObject Class Reference

Everyone inherits from KjwObject. More...

Inheritance diagram for KjwObject:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 KjwObject ()
 The KjwObject.
 destroy ()
 Destructor performing cleanup.
 id ()
 Returns a string with a unique object id.
 setError ($errorMessage)
 Set an error.
 getError ()
 Get last error.
 notImplemented ()
 Die with an "Not implemented!" message.
 trace ($msg, $level= 'DEBUG')
 Print a message to the resource pointed to by KJW_STDLOG.
 croak ($shortMsg, $detailedMsg, $backtraceShift=1)
 See kjw_croak().

Public Attributes

 $_kjwobject_id = -1
 The object identifier.
 $_kjwobject_last_error
 A last error message, if any.


Detailed Description

Everyone inherits from KjwObject.

Definition at line 27 of file KjwObject.php.


Member Function Documentation

KjwObject::destroy (  ) 

Destructor performing cleanup.

Don't rely on this being called ever. The user must call it by hand.

Reimplemented in KjwArrayResultSet, KjwFakeSql, KjwMsResultSet, KjwMsSql, KjwMyResultSet, KjwMySql, KjwPgResultSet, KjwPgSql, KjwResultSet, and KjwSql.

Definition at line 49 of file KjwObject.php.

References trace().

KjwObject::getError (  ) 

Get last error.

Returns:
The last stored error as string, or null if there was no error.

Definition at line 82 of file KjwObject.php.

Referenced by KjwMsSql::connect().

KjwObject::id (  ) 

Returns a string with a unique object id.

Returns:
The string "KjwObject(#N)" where N is a number.

Definition at line 61 of file KjwObject.php.

KjwObject::notImplemented (  ) 

Die with an "Not implemented!" message.

With this hack we can define abstract classes in PHP4.

Definition at line 90 of file KjwObject.php.

References croak().

Referenced by KjwSql::affectedRows(), KjwResultSet::at(), KjwSql::connect(), KjwSql::disconnect(), KjwSql::execute(), KjwResultSet::getNext(), KjwSql::insertId(), KjwSql::nameQuote(), KjwResultSet::seekAbs(), and KjwResultSet::size().

KjwObject::setError ( errorMessage  ) 

Set an error.

XXX do we use this?

Parameters:
$errorMessage The error message to be stored.

Definition at line 70 of file KjwObject.php.

References trace().

Referenced by KjwMsSql::connect().

KjwObject::trace ( msg,
level = 'DEBUG' 
)

Print a message to the resource pointed to by KJW_STDLOG.

Parameters:
$msg The message to print.
$level The message importance level (e.g. WARNING).

Definition at line 100 of file KjwObject.php.

References kjw_trace().

Referenced by KjwSql::_setLastQuery(), KjwMySql::connect(), destroy(), KjwObject(), and setError().


Member Data Documentation

KjwObject::$_kjwobject_id = -1

The object identifier.

So we can differentiate between objects.

Definition at line 28 of file KjwObject.php.

KjwObject::$_kjwobject_last_error

A last error message, if any.

Definition at line 29 of file KjwObject.php.


The documentation for this class was generated from the following file:

Generated on Wed Apr 8 22:16:36 2009 for KjwLib-php45 by  doxygen 1.5.8