* [ADD] Config module. Work in progress

This commit is contained in:
nuxsmin
2018-02-19 01:51:36 +01:00
parent eda5af40c7
commit faffe5495b
84 changed files with 3955 additions and 683 deletions

View File

@@ -26,7 +26,7 @@
* Función para enviar mensajes al log de errores
*
* @param mixed $data
* @param bool $printLastCaller
* @param bool $printLastCaller
*/
function debugLog($data, $printLastCaller = false)
{
@@ -48,6 +48,20 @@ function debugLog($data, $printLastCaller = false)
}
}
/**
* Procesar una excepción y registrarla en el log
*
* @param \Exception $exception
*/
function processException(\Exception $exception)
{
debugLog(__($exception->getMessage()), true);
if ($exception->getPrevious() !== null) {
debugLog(__($exception->getPrevious()->getMessage()));
}
}
/**
* @param $trace
* @return string
@@ -73,7 +87,7 @@ function formatTrace($trace)
* Alias gettext function
*
* @param string $message
* @param bool $translate Si es necesario traducir
* @param bool $translate Si es necesario traducir
* @return string
*/
function __($message, $translate = true)
@@ -97,7 +111,7 @@ function __u($message)
*
* @param string $domain
* @param string $message
* @param bool $translate
* @param bool $translate
* @return string
*/
function _t($domain, $message, $translate = true)