CommandLineContext
in package
implements
AppContext
Uses
ContextSuperGlobals
Interfaces, Classes, Traits and Enums
- AppContext
- Define a system app state context
Table of Contents
- $git_repo : Git|null
- $inline_log : bool
- __construct() : mixed
- Cached() : bool
- Get no cache context
- ContextType() : string
- Get a context type information
- Get() : mixed
- GetUser() : User|null
- Get current user
- LogLine() : bool
- Log line write a line to the local system logfile
- Repository() : Git
- The repository instance
- Set() : mixed
Properties
$git_repo
private
Git|null
$git_repo
= null
$inline_log
private
bool
$inline_log
= false
Methods
__construct()
public
__construct([mixed $inline_log = false ]) : mixed
Parameters
- $inline_log : mixed = false
Return values
mixed —Cached()
Get no cache context
public
Cached() : bool
Tags
Return values
bool —ContextType()
Get a context type information
public
ContextType() : string
Return values
string —Get()
public
Get(string $sg, string|null $key[, mixed $default = null ]) : mixed
Parameters
- $sg : string
- $key : string|null
- $default : mixed = null
Return values
mixed —GetUser()
Get current user
public
GetUser() : User|null
Tags
Return values
User|null —LogLine()
Log line write a line to the local system logfile
public
LogLine(mixed $value[, string $level = FAA_LOG_LEVEL_INFO ]) : bool
Parameters
- $value : mixed
-
The log message or any kind of object
- $level : string = FAA_LOG_LEVEL_INFO
-
The log level
Tags
Return values
bool —Write success or false on error
Repository()
The repository instance
public
Repository() : Git
It should open a git instance on demand
Return values
Git —Set()
public
Set(string $sg, string $key, mixed $data) : mixed
Parameters
- $sg : string
- $key : string
- $data : mixed