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

Class: DftkDaTrace

Source Location: /trace/dftk_da_trace.php

Class Overview


DFTK Trace Class


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 44]
DFTK Trace Class



Tags:

access:  public
author:  Duck <mailto:duck@DuckCorp.org>


[ Top ]


Class Methods


constructor DftkDaTrace [line 76]

DftkDaTrace DftkDaTrace( object DftkDaTraceManager &$manager)

Constructor



Tags:

access:  public


Parameters:

object DftkDaTraceManager   &$manager   Trace Manager

[ Top ]

method add_event [line 90]

void add_event( string $key, [mixed $params = array()], array $parals)

Add an Event to the list



Tags:

access:  public


Parameters:

string   $key   Event Id
array   $parals   List of message parameters

[ Top ]

method clear_results [line 109]

void clear_results( )

Remove every result in the list



Tags:

access:  public


[ Top ]

method gen_output [line 282]

object DftkDaTrace &gen_output( )

Generate output



Tags:

return:  Trace
access:  public


[ Top ]

method get_debug_msg [line 236]

string get_debug_msg( [boolean $html = false])

Create a debug message



Tags:

access:  public


Parameters:

boolean   $html   true for HTML output, false for plain text

[ Top ]

method get_events [line 174]

array get_events( [string $severity = null], [string $module = null], [string $section = null])

Search for events

List of severities :

  • E : error
  • W : warning
  • N : notice
Each element of the returned array contains these entries :
  • event : event Id
  • timestamp : ISO8601 date+time format when the event occured
  • module : module name in which the event occured
  • section : section name in which the event occured
  • msg : readable message
  • fullmsg : readable message with full information




Tags:

return:  Array of found events
access:  public


Parameters:

string   $severity   Severity criteria ( 'E'/'W'/'N' or null if not a criteria)
string   $module   Module name criteria (or null if not a criteria)
string   $section   Section name criteria (or null if not a criteria) (if a criteria, $module must not be null)

[ Top ]

method get_result [line 144]

mixed &get_result( string $key)

Get a result's value



Tags:

return:  Value
access:  public


Parameters:

string   $key   Result Id

[ Top ]

method has_error [line 352]

boolean has_error( )

Test if events with an 'error' severity has occured



Tags:

return:  true if such event occured
access:  public


[ Top ]

method has_warning [line 366]

boolean has_warning( )

Test if events with an 'warning' severity has occured



Tags:

return:  true if such event occured
access:  public


[ Top ]

method merge_traces [line 323]

void merge_traces( object DftkDaTrace &$trace)

Merge Traces

Merge current trace with given trace :

  • results are merged (beware of collisions)
  • events are sort-merged




Tags:

access:  public


Parameters:

object DftkDaTrace   &$trace  

[ Top ]

method set_result [line 132]

void set_result( string $key, mixed $obj)

Set a result's value



Tags:

access:  public


Parameters:

string   $key   Result Id
mixed   $obj   Value

[ Top ]

method test_if_event [line 301]

boolean test_if_event( string $key)

Look if a special event has occured



Tags:

return:  true if event occured
access:  public


Parameters:

string   $key   Event Id

[ Top ]

method unset_result [line 120]

void unset_result( string $key)

Unset a result's value



Tags:

access:  public


Parameters:

string   $key   Result Id

[ Top ]


Documentation generated on Sat, 6 Dec 2003 13:47:34 +0100 by phpDocumentor 1.2.3