PACK PHP-Binding  $VERSION$
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
WobTransactionBase Class Reference

Public Member Functions

 getHeader ($hd)
 
 notAuthenticated ()
 
 xmlParserError ()
 
 handleException ($ex)
 
 abortWithError ($text, $type="server")
 

Static Public Member Functions

static getExecutingName ()
 
static getInstance ()
 returns the currently running instance of a transaction More...
 
static setDebugLevel ($level)
 set the debug level of the server More...
 
static debug ($str, $level=self::DebugMisc)
 inserts a comment as debug statement More...
 
static printDebug ()
 print debug comment now (called from xmlToString() and TransactionError More...
 
static getDebug ()
 return debug comment now (called from xmlToString() and TransactionError More...
 
static getTransactionNameWob ()
 
static getTransactionNameSoap ()
 
static noSuchTransaction ()
 

Public Attributes

const DebugNone = 0
 no debugging (used only in setDebugLevel()) More...
 
const DebugAll = 0x0ffffff
 activate all debug (used only in setDebugLevel()) More...
 
const DebugUrgent = 0x1000000
 flag: output the debug string immediately (risks losing headers, used only in debug()) More...
 
const DebugDbError = 0x0000001
 debug database errors More...
 
const DebugDbQuery = 0x0000002
 debug database queries when they are executed More...
 
const DebugDbStatement = 0x0000004
 debug database statements when they are constructed More...
 
const DebugDbTransaction = 0x0000008
 debug database transaction start/end More...
 
const DebugDbAll = 0x00000ff
 output all database related actions (used only in setDebugLevel()) More...
 
const DebugTransactions = 0x0000100
 debug transaction related actions More...
 
const DebugMisc = 0x0800000
 miscellaneous debug output (default level) More...
 
const WobEncoding =0
 
const Soap12Encoding =1
 

Protected Member Functions

 __construct ()
 
 getRequestXml ()
 
 abortNotImplemented ()
 
 startTransaction ($updating)
 
 commitTransaction ()
 
 abortTransaction ()
 
 isAuthenticated ()
 
 isAuthorized ($transactioName)
 
 userName ()
 
 xmlCreate ($elem)
 
 xmlToString ($xml)
 

Protected Attributes

 $ainput
 
 $tinput
 
 $aoutput
 
 $toutput
 
 $headers =array()
 

Static Protected Attributes

static $debugstr =""
 
static $debuglev =0
 
static $running =""
 
static $instance =null
 

Detailed Description

Ancestor of all Transactions

Constructor & Destructor Documentation

WobTransactionBase::__construct ( )
protected

Member Function Documentation

WobTransactionBase::abortNotImplemented ( )
protected

called internally if a transaction is not implemented

WobTransactionBase::abortTransaction ( )
protected

stub: overwrite this to implement a real transaction abort action (eg. sending the DB a "ROLLBACK TRANSACTION" statement)

WobTransactionBase::abortWithError (   $text,
  $type = "server" 
)

called to abort a transactions flow

Parameters
$typeoptional defines the source of the error (should be only one word, defaults to "server")
$textthe human readable text returned to the client
WobTransactionBase::commitTransaction ( )
protected

stub: overwrite this to implement a real transaction commit action (eg. sending the DB a "COMMIT TRANSACTION" statement)

static WobTransactionBase::debug (   $str,
  $level = self::DebugMisc 
)
static

inserts a comment as debug statement

static WobTransactionBase::getDebug ( )
static

return debug comment now (called from xmlToString() and TransactionError

static WobTransactionBase::getExecutingName ( )
static

returns the name of the currently running transaction

WobTransactionBase::getHeader (   $hd)

called to determine the session id or other headers

static WobTransactionBase::getInstance ( )
static

returns the currently running instance of a transaction

WobTransactionBase::getRequestXml ( )
protected

retrieves the XML data from the request and parses headers

static WobTransactionBase::getTransactionNameSoap ( )
static

called to determine the correct transaction, aborts the script if there is none.

static WobTransactionBase::getTransactionNameWob ( )
static

Wob message encoding: called to determine the correct transaction, aborts the script if there is none.

WobTransactionBase::handleException (   $ex)

called for generic exception handling

WobTransactionBase::isAuthenticated ( )
protected

stub: returns whether the user is authenticated, overwrite if you want to use authenticated or authorized transactions

WobTransactionBase::isAuthorized (   $transactioName)
protected

stub: returns whether the user is authorized to run a specific transaction, overwrite if you want to use authorized transactions

static WobTransactionBase::noSuchTransaction ( )
static

called if the transaction is not known. aborts the script.

WobTransactionBase::notAuthenticated ( )

called if authentication fails

static WobTransactionBase::printDebug ( )
static

print debug comment now (called from xmlToString() and TransactionError

static WobTransactionBase::setDebugLevel (   $level)
static

set the debug level of the server

WobTransactionBase::startTransaction (   $updating)
protected

stub: overwrite this to implement a real transaction start action (eg. sending the DB a "BEGIN TRANSACTION" statement); the $updating parameter is set to true for transactions marked as updating

WobTransactionBase::userName ( )
protected

stub: returns the name of the user (default returns empty string)

WobTransactionBase::xmlCreate (   $elem)
protected

internal: returns an initialized XML array ("doc"=>DomDocument, "root"=>transaction rool DomElement)

WobTransactionBase::xmlParserError ( )

called if XML parsing fails

WobTransactionBase::xmlToString (   $xml)
protected

internal: converts XML array to string representation

Member Data Documentation

WobTransactionBase::$ainput
protected
WobTransactionBase::$aoutput
protected
WobTransactionBase::$debuglev =0
staticprotected
WobTransactionBase::$debugstr =""
staticprotected
WobTransactionBase::$headers =array()
protected
WobTransactionBase::$instance =null
staticprotected
WobTransactionBase::$running =""
staticprotected
WobTransactionBase::$tinput
protected
WobTransactionBase::$toutput
protected
const WobTransactionBase::DebugAll = 0x0ffffff

activate all debug (used only in setDebugLevel())

const WobTransactionBase::DebugDbAll = 0x00000ff

output all database related actions (used only in setDebugLevel())

const WobTransactionBase::DebugDbError = 0x0000001

debug database errors

const WobTransactionBase::DebugDbQuery = 0x0000002

debug database queries when they are executed

const WobTransactionBase::DebugDbStatement = 0x0000004

debug database statements when they are constructed

const WobTransactionBase::DebugDbTransaction = 0x0000008

debug database transaction start/end

const WobTransactionBase::DebugMisc = 0x0800000

miscellaneous debug output (default level)

const WobTransactionBase::DebugNone = 0

no debugging (used only in setDebugLevel())

const WobTransactionBase::DebugTransactions = 0x0000100

debug transaction related actions

const WobTransactionBase::DebugUrgent = 0x1000000

flag: output the debug string immediately (risks losing headers, used only in debug())

const WobTransactionBase::Soap12Encoding =1

encode messages in a mode compatible with SOAP 1.2, which is much less effective than WobEncoding

const WobTransactionBase::WobEncoding =0

encode messages according to PACK standard - with minimal XML levels


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