CreateSitemapCronjobLogger
extends AbstractCronjobLogger
in package
Class AbstractCronjobLogger
Table of Contents
- $logger : Logger
- $root : string
- __construct() : mixed
- AbstractCronjobLogger constructor.
- lastRun() : mixed
- Creates a "last_run" flag cache file for the concrete logger.
- lastSuccess() : mixed
- Creates a "last_success" flag cache file for the concrete logger.
- log() : void
- Adds a new log record.
- logError() : void
- Adds a new error log record.
- _camelCase2Snake() : string
- Converts a "CamelCaseString" into a "snake_case_string".
- _createCacheFlagFile() : mixed
- Creates whether the "last_success" or "last_run" flag cache file.
- _createCronjobsCacheIfNotExists() : mixed
- Creates a "cronjob" directory in the shops cache directory, if not already exists.
- _getLoggerName() : string
- Returns the name of the logger.
- _getLoggerNameInSnakeCase() : string
- Returns the logger name in snake case format.
Properties
$logger
protected
Logger
$logger
$root
protected
string
$root
Methods
__construct()
AbstractCronjobLogger constructor.
public
__construct(ExistingDirectory $root) : mixed
Parameters
- $root : ExistingDirectory
-
Shop root directory.
Tags
Return values
mixed —lastRun()
Creates a "last_run" flag cache file for the concrete logger.
public
lastRun() : mixed
Return values
mixed —lastSuccess()
Creates a "last_success" flag cache file for the concrete logger.
public
lastSuccess() : mixed
Return values
mixed —log()
Adds a new log record.
public
log([array<string|int, mixed> $context = [] ]) : void
Parameters
- $context : array<string|int, mixed> = []
-
(Optional) Additional information.
Return values
void —logError()
Adds a new error log record.
public
logError([array<string|int, mixed> $context = [] ]) : void
Parameters
- $context : array<string|int, mixed> = []
-
(Optional) Additional information.
Return values
void —_camelCase2Snake()
Converts a "CamelCaseString" into a "snake_case_string".
protected
_camelCase2Snake(string $input) : string
Parameters
- $input : string
-
Value to be formatted.
Return values
string —Snake case string of $input.
_createCacheFlagFile()
Creates whether the "last_success" or "last_run" flag cache file.
protected
_createCacheFlagFile([bool $success = true ]) : mixed
Parameters
- $success : bool = true
-
True for "success"-flag, and false otherwise.
Return values
mixed —_createCronjobsCacheIfNotExists()
Creates a "cronjob" directory in the shops cache directory, if not already exists.
protected
_createCronjobsCacheIfNotExists() : mixed
Return values
mixed —_getLoggerName()
Returns the name of the logger.
protected
_getLoggerName() : string
The name of the logger class without "Logger"-Suffix is used.
Return values
string —Name of logger.
_getLoggerNameInSnakeCase()
Returns the logger name in snake case format.
protected
_getLoggerNameInSnakeCase() : string
The name of the logger class without "Logger"-Suffix is used.
Return values
string —Logger name in snake case.