utyResult Class Reference
[Common]

Execution result. More...

List of all members.

Public Member Functions

 utyResult ($level, $code, $description, $details, $etc=NULL)
 isOk ()

Public Attributes

 $level
 $code
 $description
 $details
 $backtrace
 $time
 $etc

Detailed Description

Execution result.

Used to return detailed error information for critical functions. Usually those functions return NULL if ok or utyResult if error.

The backtrace is setted when created only if the _UTY_DEBUG lobal var is ===TRUE. if _UTY_LOG is setted and $level >= _UTY_LOG_LEVEL a log is automatically written.

See also:
$_UTY_DEBUG
$_UTY_LOG
$_UTY_LOG_PATH

NOTABENE: backtrace may contain sensitive data, so you should never set $_UTY_DEBUG=TRUE in a production enviroment


Member Function Documentation

isOk (  ) 
Returns:
TRUE if level === UTY_ERR_NONE, FALSE otherwise
utyResult ( level,
code,
description,
details,
etc = NULL 
)

Create an utyResult with the specified parameters

Parameters:
level (UTY_ERR_*) error level: one of the UTY_ERR_* error level defines.
See also:
enum UTY_ERR defines
Parameters:
code (string) unique error identifier
description (string) international error description
details (string) error details (usually native error)
[etc] (mixed) xtra user data, default=NULL

Member Data Documentation

$backtrace

(array) php debug_backtrace or NULL (depending on UTY_DEBUG value)

$code

(string) error code (the unique error id defined by the programmer)

$description

(string) error description (internationalized)

$details

(string) error details (usually the native error: not internationalizable)

$etc

(mixed) user data

$level

(UTY_ERR_*) error level

See also:
enum UTY_ERR defines
$time

(int) unix timestamp when instantiated


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations

Copyright © 2010 Attilio Pavone - www.utillyty.eu