BaseIO
in package
implements
IOInterface, LoggerInterface
Interfaces, Classes and Traits
- IOInterface
- The Input/Output helper interface.
- LoggerInterface
- Describes a logger instance.
Table of Contents
- $authentications : mixed
- alert() : null
- Action must be taken immediately.
- critical() : null
- Critical conditions.
- debug() : null
- Detailed debug information.
- emergency() : null
- System is unusable.
- error() : null
- Runtime errors that do not require immediate action but should typically be logged and monitored.
- getAuthentication() : array<string|int, mixed>
- Get the username and password of repository.
- getAuthentications() : array<string|int, mixed>
- Get all authentication information entered.
- hasAuthentication() : bool
- Verify if the repository has a authentication information.
- info() : null
- Interesting events.
- loadConfiguration() : mixed
- Loads authentications from a config instance
- log() : null
- Logs with an arbitrary level.
- notice() : null
- Normal but significant events.
- resetAuthentications() : mixed
- {@inheritDoc}
- setAuthentication() : mixed
- Set the authentication information for the repository.
- warning() : null
- Exceptional occurrences that are not errors.
- writeErrorRaw() : mixed
- {@inheritDoc}
- writeRaw() : mixed
- {@inheritDoc}
- checkAndSetAuthentication() : mixed
- Check for overwrite and set the authentication information for the repository.
Properties
$authentications
protected
mixed
$authentications
= array()
Methods
alert()
Action must be taken immediately.
public
alert(string $message[, array<string|int, mixed> $context = array() ]) : null
Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
null —critical()
Critical conditions.
public
critical(string $message[, array<string|int, mixed> $context = array() ]) : null
Example: Application component unavailable, unexpected exception.
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
null —debug()
Detailed debug information.
public
debug(string $message[, array<string|int, mixed> $context = array() ]) : null
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
null —emergency()
System is unusable.
public
emergency(string $message[, array<string|int, mixed> $context = array() ]) : null
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
null —error()
Runtime errors that do not require immediate action but should typically be logged and monitored.
public
error(string $message[, array<string|int, mixed> $context = array() ]) : null
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
null —getAuthentication()
Get the username and password of repository.
public
getAuthentication(mixed $repositoryName) : array<string|int, mixed>
Parameters
- $repositoryName : mixed
-
The unique name of repository
Return values
array<string|int, mixed> —The 'username' and 'password'
getAuthentications()
Get all authentication information entered.
public
getAuthentications() : array<string|int, mixed>
Return values
array<string|int, mixed> —The map of authentication data
hasAuthentication()
Verify if the repository has a authentication information.
public
hasAuthentication(mixed $repositoryName) : bool
Parameters
- $repositoryName : mixed
-
The unique name of repository
Return values
bool —info()
Interesting events.
public
info(string $message[, array<string|int, mixed> $context = array() ]) : null
Example: User logs in, SQL logs.
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
null —loadConfiguration()
Loads authentications from a config instance
public
loadConfiguration(Config $config) : mixed
Parameters
- $config : Config
Return values
mixed —log()
Logs with an arbitrary level.
public
log(mixed $level, string $message[, array<string|int, mixed> $context = array() ]) : null
Parameters
- $level : mixed
- $message : string
- $context : array<string|int, mixed> = array()
Return values
null —notice()
Normal but significant events.
public
notice(string $message[, array<string|int, mixed> $context = array() ]) : null
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
null —resetAuthentications()
{@inheritDoc}
public
resetAuthentications() : mixed
Return values
mixed —setAuthentication()
Set the authentication information for the repository.
public
setAuthentication(mixed $repositoryName, mixed $username[, mixed $password = null ]) : mixed
Parameters
- $repositoryName : mixed
-
The unique name of repository
- $username : mixed
-
The username
- $password : mixed = null
-
The password
Return values
mixed —warning()
Exceptional occurrences that are not errors.
public
warning(string $message[, array<string|int, mixed> $context = array() ]) : null
Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
Parameters
- $message : string
- $context : array<string|int, mixed> = array()
Return values
null —writeErrorRaw()
{@inheritDoc}
public
writeErrorRaw(mixed $messages[, mixed $newline = true ][, mixed $verbosity = self::NORMAL ]) : mixed
Parameters
- $messages : mixed
- $newline : mixed = true
- $verbosity : mixed = self::NORMAL
Return values
mixed —writeRaw()
{@inheritDoc}
public
writeRaw(mixed $messages[, mixed $newline = true ][, mixed $verbosity = self::NORMAL ]) : mixed
Parameters
- $messages : mixed
- $newline : mixed = true
- $verbosity : mixed = self::NORMAL
Return values
mixed —checkAndSetAuthentication()
Check for overwrite and set the authentication information for the repository.
protected
checkAndSetAuthentication(string $repositoryName, string $username[, string $password = null ]) : mixed
Parameters
- $repositoryName : string
-
The unique name of repository
- $username : string
-
The username
- $password : string = null
-
The password