Documentation

ToFile extends ToMemory
in package
implements Loggingable

Basic Class of EasePHP

Interfaces, Classes, Traits and Enums

Loggingable

Table of Contents

$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  : mixed
Saves obejct instace (singleton...).
$logFileHandle  : resource|bool
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()  : mixed
Nastaví cesty logovacích souborů.
singleton()  : ToFile
Get instanece of File Logger
testDirectory()  : bool
Zkontroluje stav adresáře a upozorní na případné nesnáze.

Properties

$debug

Debug mode flag.

public bool $debug = false

$easeShared

Obecné konfigurace frameworku.

public Shared $easeShared = null

$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 = null

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 = null

$statusMessages

Messages live here

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

$instance

Saves obejct instace (singleton...).

private static mixed $instance = null

$logFileHandle

Filedescriptor Logu.

private resource|bool $logFileHandle = null

$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 = '' ]) : mixed
Parameters
$baseLogDir : string = ''
Return values
mixed

singleton()

Get instanece of File Logger

public static singleton([string $logdir = null ]) : ToFile
Parameters
$logdir : string = null
Return values
ToFile

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