ultimix
error_log_access_1_0_0 Class Reference

Public Member Functions

 set_add_limitations ($theAddLimitation)
 add_message_to_log ($Severity, $Title, $Description)
 unsafe_select_messages ($Condition= '1=1')
 delete_error_log ($id)

Data Fields

 $AddLimitations = '1 = 1'

Detailed Description

Error log' implementation.

Author
Dodonov A.A.

Definition at line 26 of file error_log_access.php.

Member Function Documentation

add_message_to_log (   $Severity,
  $Title,
  $Description 
)

Function creates error message.

Parameters
$Severity- Error log item's severity.
$Title- Error log item's title.
$Description- Error log item's message.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 103 of file error_log_access.php.

{
try
{
$Security = get_package( 'security' , 'last' , __FILE__ );
$Severity = $Security->get( $Severity , 'integer' );
$Title = $Security->get( $Title , 'command' );
$Description = $Security->get( $Description , 'raw' );
$Database = get_package( 'database' , 'last' , __FILE__ );
$Database->insert(
'umx_error_log' , 'severity , title , description , error_date' ,
"$Severity , '$Title' , '$Description' , NOW()"
);
$Database->commit();
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
delete_error_log (   $id)

Function deletes record.

Parameters
$id- Идентификатор удаления записи.
Exceptions
Exception- кидается иключение этого типа с описанием ошибки.
Author
Додонов А.А.

Definition at line 176 of file error_log_access.php.

{
try
{
$Database = get_package( 'database' , 'last' , __FILE__ );
$Security = get_package( 'security' , 'last' , __FILE__ );
$id = $Security->get( $id , 'integer' );
$Database->delete( 'umx_error_log' , "( $this->AddLimitations ) AND id = $id" );
$Database->commit();
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
set_add_limitations (   $theAddLimitation)

Function sets additional limitations.

Parameters
$theAddLimitation- Additional limitations.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 58 of file error_log_access.php.

{
try
{
if( $this->AddLimitations === '1 = 1' )
{
$this->AddLimitations = $theAddLimitation;
}
else
{
throw( new Exception( '"AddLimitations" was already set' ) );
}
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
unsafe_select_messages (   $Condition = '1 = 1')

Function selects records.

Parameters
$Condition- Records selection filter.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 143 of file error_log_access.php.

{
try
{
$Database = get_package( 'database' , 'last' , __FILE__ );
$Database->query_as( DB_OBJECT );
$Results = $Database->select( '*' , 'umx_error_log' , "( $this->AddLimitations ) AND $Condition" );
return( $Results );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

Field Documentation

$AddLimitations = '1 = 1'

Definition at line 38 of file error_log_access.php.


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