Contentserv PHP API

CSLogEntry
in package

Defines a plain and an abstract API object for the log handling.

The class defines only standard setter and getter methods. It is a plain API object without any connection to the "LogEntry" object!

The object can be called via the API class CSLog::getLogEntry(). After initializing and inserting the information to the API object it can be stored with the function CSLog::addLogEntry();

Tags
since

CS16.0.0

Table of Contents

__construct()  : mixed
CSLogEntry constructor.
getDateTime()  : string
Returns the datetime of the API log object.
getLevel()  : int
Returns the log level.
getType()  : int
Returns the log type.
getUser()  : CSUser|User|null
Returns the defined user.
getUserId()  : int
Returns the id of the defined user.
getUserName()  : string
Returns the username of the defined user.
setDateTime()  : void
Sets the date time for the current API log object.
setLevel()  : void
Sets the log level.
setType()  : void
Sets the log type.
setUser()  : void
Sets the user object for the current API log object.

Methods

__construct()

CSLogEntry constructor.

public __construct() : mixed
Tags
Return values
mixed

getDateTime()

Returns the datetime of the API log object.

public getDateTime() : string
Tags
Return values
string

with the datetime.

getLevel()

Returns the log level.

public getLevel() : int
Tags
Return values
int

with the level of the log.

getType()

Returns the log type.

public getType() : int
Tags
Return values
int

with the type of the log.

getUser()

Returns the defined user.

public getUser() : CSUser|User|null

If no user has been defined the current user will be returned.

Tags
Return values
CSUser|User|null

the user API log object.

getUserId()

Returns the id of the defined user.

public getUserId() : int

If no user has been defined the current user id will be returned.

Tags
Return values
int

with the user id of the API log object.

getUserName()

Returns the username of the defined user.

public getUserName() : string

If no user has been defined the current username will be returned.

Tags
Return values
string

with the username of the API log object.

setDateTime()

Sets the date time for the current API log object.

public setDateTime(string $sDateTime) : void

If not set manually the date time will be set automatically in the constructor.

Parameters
$sDateTime : string
Tags
Return values
void

setLevel()

Sets the log level.

public setLevel([int $iLevel = CSLog::LEVEL_MINIMUM ]) : void
Parameters
$iLevel : int = CSLog::LEVEL_MINIMUM
Tags
see
CSLog

constants

throws
CSLogException
Return values
void

setType()

Sets the log type.

public setType([int $iType = CSLog::TYPE_NOTE ]) : void
Parameters
$iType : int = CSLog::TYPE_NOTE
Tags
see
CSLog

constants

Return values
void

setUser()

Sets the user object for the current API log object.

public setUser(User|CSUser $oUser) : void
Parameters
$oUser : User|CSUser
Tags
Return values
void

        

Search results