Dotclear 2.24
Loading...
Searching...
No Matches
dcLog Class Reference

Public Member Functions

 __construct ()
 
 getLogs (array $params=[], bool $count_only=false)
 
 addLog (cursor $cur)
 
 delLogs ($id, bool $all=false)
 

Data Fields

const LOG_TABLE_NAME = 'log'
 

Protected Attributes

 $log_table
 
 $user_table
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Constructs a new instance.

References dcCore\app(), LOG_TABLE_NAME, and dcAuth\USER_TABLE_NAME.

Member Function Documentation

◆ getLogs()

getLogs ( array  $params = [],
bool  $count_only = false 
)

Retrieves logs.

$params is an array taking the following optionnal parameters:

  • blog_id: Get logs belonging to given blog ID
  • user_id: Get logs belonging to given user ID
  • log_ip: Get logs belonging to given IP address
  • log_table: Get logs belonging to given log table
  • order: Order of results (default "ORDER BY log_dt DESC")
  • limit: Limit parameter
Parameters
array$paramsThe parameters
bool$count_onlyCount only resultats
Returns
dcRecord The logs.

References dcCore\app().

◆ addLog()

addLog ( cursor  $cur)

Creates a new log. Takes a cursor as input and returns the new log ID.

Parameters
cursor$curThe current
Returns
integer

References dcCore\app(), and cursor\insert().

◆ delLogs()

delLogs (   $id,
bool  $all = false 
)

Deletes a log.

Parameters
mixed$idThe identifier
bool$allRemove all logs

Field Documentation

◆ LOG_TABLE_NAME

const LOG_TABLE_NAME = 'log'

◆ $log_table

$log_table
protected

◆ $user_table

$user_table
protected

The documentation for this class was generated from the following file: