Table of Contents
Properties
-
$clientIpAddress
: string
-
$isUserLoggedIn
: bool
-
$logger
: object|null
-
$userName
: string
-
$userRole
: string
Methods
-
__construct()
: mixed
-
getClientIpAddress()
: string
-
getLoginStatus()
: bool
-
getUserName()
: string
-
getUserRole()
: string
-
log()
: void
-
setIpAddress()
: void
-
setLoginStatus()
: void
-
setUserName()
: void
-
setUserRole()
: void
$clientIpAddress
private
string
$clientIpAddress
$isUserLoggedIn
private
bool
$isUserLoggedIn
= false
$logger
private
object|null
$logger
= null
$userName
private
string
$userName
$userRole
private
string
$userRole
= 'user'
__construct()
public
__construct([string $name = '' ][, string $ip = '' ]) : mixed
Parameters
-
$name
: string
= ''
-
-
$ip
: string
= ''
-
getClientIpAddress()
public
getClientIpAddress() : string
getLoginStatus()
public
getLoginStatus() : bool
getUserName()
public
getUserName() : string
getUserRole()
public
getUserRole() : string
log()
public
log([mixed $message = '' ][, string $level = 'info' ][, mixed $backtrace = null ][, int $spacing = 0 ]) : void
Parameters
-
$message
: mixed
= ''
-
-
$level
: string
= 'info'
-
-
$backtrace
: mixed
= null
-
-
$spacing
: int
= 0
-
setIpAddress()
public
setIpAddress(string $ip) : void
Parameters
-
$ip
: string
-
setLoginStatus()
public
setLoginStatus([bool|null $isUserLoggedIn = null ]) : void
Parameters
-
$isUserLoggedIn
: bool|null
= null
-
setUserName()
public
setUserName(string $name) : void
Parameters
-
$name
: string
-
setUserRole()
public
setUserRole(string $role) : void
Parameters
-
$role
: string
-