TimeTrex API Manual

LogRotate
in package

Table of Contents

$config_arr  : mixed
__construct()  : mixed
LogRotate constructor.
_rotate()  : bool
addConfig()  : bool
getFileList()  : array<string|int, mixed>|bool
getRotatedHistoryFiles()  : array<string|int, mixed>|bool
handleHistoryFiles()  : bool
isFileReadyToRotate()  : bool
isFileRotatable()  : bool
Checks to see if the file has a numeric extension signifying that it is not a primary file and has already been rotated.
padExtension()  : string
Rotate()  : bool

Properties

Methods

__construct()

LogRotate constructor.

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

_rotate()

public _rotate( $files,  $rotate_config) : bool
Parameters
$files :
$rotate_config :
Return values
bool

addConfig()

public addConfig( $arr) : bool
Parameters
$arr :
Return values
bool

getFileList()

public getFileList( $start_dir[, null $regex_filter = null ][, bool $recurse = false ]) : array<string|int, mixed>|bool
Parameters
$start_dir :
$regex_filter : null = null
$recurse : bool = false
Return values
array<string|int, mixed>|bool

getRotatedHistoryFiles()

public getRotatedHistoryFiles( $files,  $primary_file) : array<string|int, mixed>|bool
Parameters
$files :
$primary_file :
Return values
array<string|int, mixed>|bool

handleHistoryFiles()

public handleHistoryFiles( $files, int $history) : bool
Parameters
$files :
$history : int
Return values
bool

isFileReadyToRotate()

public isFileReadyToRotate( $file[, string $frequency = 'daily' ]) : bool
Parameters
$file :
$frequency : string = 'daily'
Return values
bool

isFileRotatable()

Checks to see if the file has a numeric extension signifying that it is not a primary file and has already been rotated.

public isFileRotatable( $file) : bool
Parameters
$file :
Return values
bool

padExtension()

public padExtension( $extension,  $history) : string
Parameters
$extension :
$history :
Return values
string

Search results