\PhoolDisplay

Static functions used to display messages (normal, trace, debug.

..)

Summary

Methods
Properties
Constants
incVerbose()
decVerbose()
setVerbose()
error()
warning()
errorCount()
getErrors()
msg()
info()
trace()
debug()
boolStr()
vdump()
showTrace()
varType()
bool2str()
No public properties found
MAX_VERBOSE_LEVEL
MIN_VERBOSE_LEVEL
No protected methods found
No protected properties found
N/A
_display()
$prefix
$verbose_level
$errors
N/A

Constants

MAX_VERBOSE_LEVEL

MAX_VERBOSE_LEVEL

MIN_VERBOSE_LEVEL

MIN_VERBOSE_LEVEL

Properties

$prefix

$prefix : 

Type

$verbose_level

$verbose_level : integer

Type

integer — Verbose level, default=0

$errors

$errors : integer

Type

integer — Array containing the error msgs since the beginning

Methods

incVerbose()

incVerbose() : void

Increment verbose level

decVerbose()

decVerbose() : void

Decrement verbose level

setVerbose()

setVerbose(integer  $level) : void

Set verbose level

Parameters

integer $level

integer

error()

error(string  $msg) : void

Display an error message

Parameters

string $msg

The message

warning()

warning(string  $msg) : void

Display a warning message

Parameters

string $msg

The message

errorCount()

errorCount() : integer

Return the current error count

Returns

integer

getErrors()

getErrors() : array

Return the error array

Returns

array

msg()

msg(string  $msg) : void

Display a level 0 message

Parameters

string $msg

The message

info()

info(string  $msg) : void

Display an info message

Parameters

string $msg

The message

trace()

trace(string  $msg) : void

Display a trace message

Parameters

string $msg

The message

debug()

debug(string  $msg) : void

Display a debug message

Parameters

string $msg

The message

boolStr()

boolStr(boolean  $val) : string

Convert a boolean to a displayable string

Parameters

boolean $val

The boolean value to convert

Returns

string —

The string to display

vdump()

vdump(\Phool\any  $var) : string

Converts a variable through var_dump()

Parameters

\Phool\any $var

The value to convert

Returns

string —

The dumped value

showTrace()

showTrace() : void

Display current stack trace

varType()

varType(\Phool\any  $var) : string

Return displayable type of a variable

Parameters

\Phool\any $var

Returns

string

bool2str()

bool2str(\Phool\any  $var) : string

Convert a boolean to a displayable string

Parameters

\Phool\any $var

Returns

string

_display()

_display(string  $msg, integer  $level) : void

Conditionnally display a string to stderr

Display the string if the message level is less or equal to the verbose level

Parameters

string $msg

The message

integer $level

The message level