Database
in package
implements
HandlerInterface, LoggerAwareInterface
Uses
LoggerAwareTrait
Class Database
Tags
Interfaces, Classes, Traits and Enums
- HandlerInterface
- Interface HandlerInterface
- LoggerAwareInterface
Table of Contents
- $baseUrl : string
- $feedbackService : FeedbackServiceInterface
- __construct() : mixed
- Constructor
- handle() : bool
- Get data from submitted form and process them.
- debug() : void
- Log a debug message.
- log() : void
- Send a message to the logger.
- logError() : void
- Log an error message.
- logWarning() : void
- Log a warning message.
Properties
$baseUrl
protected
string
$baseUrl
$feedbackService
protected
FeedbackServiceInterface
$feedbackService
Methods
__construct()
Constructor
public
__construct(FeedbackServiceInterface $feedbackService, string $baseUrl) : mixed
Parameters
- $feedbackService : FeedbackServiceInterface
-
Feedback database service
- $baseUrl : string
-
Site base url
Return values
mixed —handle()
Get data from submitted form and process them.
public
handle(Form $form, Params $params[, UserEntityInterface|null $user = null ]) : bool
Parameters
- $form : Form
-
Submitted form
- $params : Params
-
Request params
- $user : UserEntityInterface|null = null
-
Authenticated user
Return values
bool —debug()
Log a debug message.
protected
debug(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?
Return values
void —log()
Send a message to the logger.
protected
log(string $level, string $message[, array<string|int, mixed> $context = [] ][, bool $prependClass = false ]) : void
Parameters
- $level : string
-
Log level
- $message : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = false
-
Prepend class name to message?
Return values
void —logError()
Log an error message.
protected
logError(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?
Return values
void —logWarning()
Log a warning message.
protected
logWarning(string $msg[, array<string|int, mixed> $context = [] ][, bool $prependClass = true ]) : void
Parameters
- $msg : string
-
Log message
- $context : array<string|int, mixed> = []
-
Log context
- $prependClass : bool = true
-
Prepend class name to message?