pclib  3.0.0
Lightweight PHP framework
Public Member Functions | Data Fields | Protected Attributes
LoggerDbStorage Class Reference

This class is responsible for reading/writing of the log. More...

Inheritance diagram for LoggerDbStorage:
BaseObject

Public Member Functions

 log (array $logItem)
 Store logitem to the log. More...
 
 delete ($keepDays, $allLogs=false)
 Delete records from the log.
 
 getLabelId ($label, $category)
 Translate text to text_id (using table LOGGER_LABELS) If text is not found in the table, it is added.
 
 getLog ($rowCount, array $filter=null)
 Return last $rowcount records from the log. More...
 
- Public Member Functions inherited from BaseObject
 loadDefaults ($className=null)
 Load default parameters of class $className into object instance.
 
 setProperties (array $defaults)
 Set public properties of object from the array. More...
 
 toArray ()
 Convert object to array. More...
 

Data Fields

 $db
 var Db
 
- Data Fields inherited from BaseObject
 $serviceLocator
 var function() Return service object when requested with service().
 

Protected Attributes

 $logger
 var Logger
 

Additional Inherited Members

- Static Public Member Functions inherited from BaseObject
static defaults ()
 Set or retireve default parameters of the object. More...
 
- Protected Member Functions inherited from BaseObject
 service ($service, $default=null)
 Try acquire $service and load it into property $this->$service. More...
 

Detailed Description

This class is responsible for reading/writing of the log.

Override if you need different storage.

Member Function Documentation

◆ getLog()

getLog (   $rowCount,
array  $filter = null 
)

Return last $rowcount records from the log.

Parameters
int$rowCountNumber of rows
array$filterSet filter on USERNAME,ACTIONNAME,LOGGERNAME. Ex: array('USERNAME'=>'joe')
Returns
array Array of last records

◆ log()

log ( array  $logItem)

Store logitem to the log.

Parameters
array$logItem
Returns
$id

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