Documentation

ToFile extends ToMemory
in package
implements Loggingable

Basic Class of EasePHP.

Interfaces, Classes, Traits and Enums

Loggingable

Table of Contents

$capacity  : int
Number of messages to keep.
$debug  : bool
Debug mode flag.
$easeShared  : Shared
Obecné konfigurace frameworku.
$logFileName  : string
Soubor s do kterého se zapisuje log.
$logPrefix  : string
Adresář do kterého se zapisují logy.
$logStyles  : array<string|int, mixed>
Hodnoty pro obarvování logu.
$logType  : string
Předvolená metoda logování.
$parentObject  : Sand
Odkaz na vlastnící objekt.
$statusMessages  : array<string|int, mixed>
Messages live here.
$instance  : self
Saves obejct instace (singleton...).
$logFileHandle  : bool|resource
Filedescriptor Logu.
$messageID  : int
ID naposledy ulozene zpravy.
__construct()  : mixed
Logovací třída.
__destruct()  : mixed
Uzavře chybové soubory.
__toString()  : string
Magical function for all descendants (childern).
addToLog()  : int
Zapise zapravu do logu.
draw()  : string
Default draw method.
getLogStyle()  : string
Vrací styl logování.
getObjectName()  : string
Returns object name.
methodName()  :
setupLogFiles()  : void
Nastaví cesty logovacích souborů.
singleton()  : self
Get instanece of File Logger.
testDirectory()  : bool
Zkontroluje stav adresáře a upozorní na případné nesnáze.

Properties

$capacity

Number of messages to keep.

public int $capacity = 1024

$debug

Debug mode flag.

public bool $debug = false

$easeShared

Obecné konfigurace frameworku.

public Shared $easeShared

$logFileName

Soubor s do kterého se zapisuje log.

public string $logFileName = 'Ease.log'

$logPrefix

Adresář do kterého se zapisují logy.

public string $logPrefix = ''

dirpath

$logStyles

Hodnoty pro obarvování logu.

public array<string|int, mixed> $logStyles = ['notice' => 'color: black;', 'success' => 'color: #2C5F23;', 'message' => 'color: #2C5F23;', 'warning' => 'color: #AB250E;', 'error' => 'color: red;', 'debug' => 'font-style: italic;', 'report' => 'font-wight: bold;', 'info' => 'color: blue;']

$logType

Předvolená metoda logování.

public string $logType = 'memory'

$parentObject

Odkaz na vlastnící objekt.

public Sand $parentObject

$statusMessages

Messages live here.

public static array<string|int, mixed> $statusMessages = []

$instance

Saves obejct instace (singleton...).

private static self $instance

$logFileHandle

Filedescriptor Logu.

private bool|resource $logFileHandle

$messageID

ID naposledy ulozene zpravy.

private int $messageID = 0

unsigned

Methods

__construct()

Logovací třída.

public __construct([string $baseLogDir = null ]) : mixed
Parameters
$baseLogDir : string = null
Return values
mixed

__destruct()

Uzavře chybové soubory.

public __destruct() : mixed
Return values
mixed

__toString()

Magical function for all descendants (childern).

public __toString() : string
Return values
string

addToLog()

Zapise zapravu do logu.

public addToLog(string $caller, string $message[, string $type = 'notice' ]) : int
Parameters
$caller : string

název volajícího objektu

$message : string

zpráva

$type : string = 'notice'

typ zprávy (success|info|error|warning|*)

Return values
int

bytes written

draw()

Default draw method.

public draw() : string
Return values
string

getLogStyle()

Vrací styl logování.

public getLogStyle([string $logType = 'notice' ]) : string
Parameters
$logType : string = 'notice'

typ logu warning|info|success|error|notice|*

Return values
string

getObjectName()

Returns object name.

public getObjectName() : string
Return values
string

methodName()

public methodName(type $paramName) :

Description

Parameters
$paramName : type
Return values

setupLogFiles()

Nastaví cesty logovacích souborů.

public setupLogFiles([string $baseLogDir = '' ]) : void
Parameters
$baseLogDir : string = ''
Return values
void

singleton()

Get instanece of File Logger.

public static singleton([string $logdir = '' ]) : self
Parameters
$logdir : string = ''
Return values
self

testDirectory()

Zkontroluje stav adresáře a upozorní na případné nesnáze.

public static testDirectory(string $directoryPath[, bool $isDir = true ][, bool $isReadable = true ][, bool $isWritable = true ]) : bool
Parameters
$directoryPath : string

cesta k adresáři

$isDir : bool = true

detekovat existenci adresáře

$isReadable : bool = true

testovat čitelnost

$isWritable : bool = true

testovat zapisovatelnost

Return values
bool

konečný výsledek testu

Search results