PhpidsLogs extends PhpidsModel
PHPIDS Logs
Table of Contents
Methods
| add() | Adds a intrusion request to the log |
| getList() | Fetches a list of PHPIDS log entries |
| getListCount() | The total number of results in the set of results |
| rotate() | Rotate logs |
| getLogs() | Return a partial Record object query to fetch logs |
Methods
add()
Adds a intrusion request to the log
public
add(array<string|int, mixed> $vars) : mixed
Parameters
- $vars : array<string|int, mixed>
-
An array of intrustion dection info including:
- name The name of the event to log
- value The value that violated a rule
- uri The URI requested when the rule was violated
- user_id The ID of the user that made the request
- ip The IP address of the user that made the request
- impact The impact rating of the violated rule
- tags An array of tags triggered by request
getList()
Fetches a list of PHPIDS log entries
public
getList([int $page = 1 ][, string $order = ['date_added' => 'DESC'] ]) : array<string|int, mixed>
Parameters
- $page : int = 1
-
The page of results to fetch
- $order : string = ['date_added' => 'DESC']
-
The sort and order conditions (e.g. array('sort_field'=>"ASC"), optional)
Return values
array<string|int, mixed> —An array of stdClass objects, each representing a PHPIDS log entry
getListCount()
The total number of results in the set of results
public
getListCount() : int
Return values
int —The total number of results in the set of results
rotate()
Rotate logs
public
rotate(int $company_id, int $days) : mixed
Parameters
- $company_id : int
-
The ID of the company
- $days : int
-
The number of days to maintain logs
getLogs()
Return a partial Record object query to fetch logs
private
getLogs() : stdClass
Return values
stdClass —A stdClass object representing a PHPIDS Log entry