class FileRotator
Rotate system for files
Constants
ROTATE_PERIODIC |
Use this to make a rotation based on time
|
ROTATE_FILESIZE |
Use it to make a rotation base on file size
|
Methods
__construct(string $file_path, int $flag = self::ROTATE_PERIODIC, array $user_options = array())
Creation of a new file rotator |
||
bool |
write(string $content = '')
Write a string in the file |
|
bool |
rotate(bool $force = false)
Rotate file if so |
|
bool |
mustRotate()
Does the current file need to be rotated |
|
string |
getFilename(string $file_name, int $rotation_index)
Get the name of a file to rotate |
Details
at line 85
public
__construct(string $file_path, int $flag = self::ROTATE_PERIODIC, array $user_options = array())
Creation of a new file rotator
at line 108
public bool
write(string $content = '')
Write a string in the file
at line 138
public bool
rotate(bool $force = false)
Rotate file if so
at line 170
public bool
mustRotate()
Does the current file need to be rotated
at line 193
public string
getFilename(string $file_name, int $rotation_index)
Get the name of a file to rotate