Detailed Description
Trace class.
- Author
- Dodonov A.A.
Definition at line 31 of file trace.php.
Constructor & Destructor Documentation
Constructor.
- Author
- Dodonov A.A.
Definition at line 92 of file trace.php.
{
try
{
$this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
$this->String =
get_package(
'string' ,
'last' , __FILE__ );
$Data = array(
ERROR => 'trace_line_error.tpl' , COMMON => 'trace_line_common.tpl' ,
NOTIFICATION => 'trace_line_notification.tpl' , QUERY => 'trace_line_query.tpl' ,
'start_group' => 'trace_start_group.tpl' , 'end_group' => 'trace_end_group.tpl'
);
foreach( $Data as $Key => $Value )
{
$this->Templates[ $Key ] = $this->CachedMultyFS->get_template( __FILE__ , $Value );
}
}
catch( Exception $e )
{
}
}
Member Function Documentation
Function converts object to string.
- Returns
- String with the object's description.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 438 of file trace.php.
{
try
{
return( "" );
}
catch( Exception $e )
{
}
}
| add_action |
( |
|
$ActionName, |
|
|
|
$ActionDescription |
|
) |
| |
Method adds record to log.
- Parameters
-
| $ActionName | - Action's title. |
| $ActionDescription | - Action's description. |
- Author
- Dodonov A.A.
Definition at line 247 of file trace.php.
{
try
{
if( $this->StoreTrace )
{
$Database->insert(
'umx_action' , "action_name , time , info" ,
"'".htmlspecialchars( $ActionName , ENT_QUOTES )."', NOW() ,'".
htmlspecialchars( $ActionDescription , ENT_QUOTES )."'"
);
}
}
catch( Exception $e )
{
}
}
| add_trace_string |
( |
|
$Str, |
|
|
|
$Type = COMMON |
|
) |
| |
Method adds tracing string.
- Parameters
-
| $Str | - Trace string. |
| $Type | - String type. |
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 138 of file trace.php.
{
try
{
if( $this->StoreTrace )
{
$Template = str_replace( '{string}' , $Str , $this->Templates[ $Type ] );
$this->TraceStrings [] = array( 'name' => 'string' , 'content' => $Template );
}
}
catch( Exception $e )
{
}
}
Method compiles trace.
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 396 of file trace.php.
{
try
{
if( $this->StoreTrace )
{
$Output = $this->compile_trace_items();
$TraceBlock = $this->CachedMultyFS->get_template( __FILE__ , 'trace_block.tpl' );
$TraceBlock = str_replace( '{output}' , $Output , $TraceBlock );
return( $TraceBlock );
}
else
{
return( '{lang:trace_switched_off}' );
}
}
catch( Exception $e )
{
}
}
Method ends group.
- Parameters
-
| $Count | - Count of the ending groups. |
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 209 of file trace.php.
{
try
{
if( $this->StoreTrace )
{
for( $i = 0 ; $i < $Count ; $i++ )
{
$this->TraceStrings [] = array(
'name' => 'end_group' , 'content' => $this->Templates[ 'end_group' ]
);
}
}
}
catch( Exception $e )
{
}
}
Method adds group.
- Parameters
-
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 173 of file trace.php.
{
try
{
if( $this->StoreTrace )
{
$Template = str_replace( '{string}' , $Str , $this->Templates[ 'start_group' ] );
$Template = str_replace( '{i}' , count( $this->TraceStrings ) , $Template );
$this->TraceStrings [] = array( 'name' => 'start_group' , 'content' => $Template );
}
}
catch( Exception $e )
{
}
}
Field Documentation
Cached objects.
- Author
- Dodonov A.A.
Definition at line 79 of file trace.php.
Tracing strings.
- Author
- Dodonov A.A.
Definition at line 43 of file trace.php.
Templates.
- Author
- Dodonov A.A.
Definition at line 67 of file trace.php.
Tracing strings.
- Author
- Dodonov A.A.
Definition at line 55 of file trace.php.
The documentation for this class was generated from the following file: