mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 01:12:17 +00:00
All the libraries, when it is required, now are using the message helper
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
<?php
|
||||
|
||||
if (! defined("BASEPATH")) exit("No direct script access allowed");
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Utility class to be used in the database migration process
|
||||
* Library usefull for logging!
|
||||
*/
|
||||
class LogLib
|
||||
{
|
||||
const DEBUG = "debug";
|
||||
const ERROR = "error";
|
||||
const INFO = "info";
|
||||
const DEBUG = 'debug';
|
||||
const ERROR = 'error';
|
||||
const INFO = 'info';
|
||||
|
||||
const CALLER_PREFIX = "[";
|
||||
const CALLER_POSTFIX = "]";
|
||||
const CLASS_POSTFIX = "->";
|
||||
const LINE_SEPARATOR = ":";
|
||||
const CALLER_PREFIX = '[';
|
||||
const CALLER_POSTFIX = ']';
|
||||
const CLASS_POSTFIX = '->';
|
||||
const LINE_SEPARATOR = ':';
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
@@ -25,12 +25,12 @@ class LogLib
|
||||
{
|
||||
$formatted = LogLib::CALLER_PREFIX;
|
||||
|
||||
if (!is_null($class) && $class != "")
|
||||
if (!is_null($class) && $class != '')
|
||||
{
|
||||
$formatted .= $class . LogLib::CLASS_POSTFIX;
|
||||
}
|
||||
|
||||
$formatted .= $function . LogLib::LINE_SEPARATOR . $line . LogLib::CALLER_POSTFIX . " ";
|
||||
$formatted .= $function . LogLib::LINE_SEPARATOR . $line . LogLib::CALLER_POSTFIX . ' ';
|
||||
|
||||
return $formatted;
|
||||
}
|
||||
@@ -40,23 +40,23 @@ class LogLib
|
||||
$classIndex = 3;
|
||||
$functionIndex = 3;
|
||||
$lineIndex = 2;
|
||||
$class = "";
|
||||
$function = "";
|
||||
$line = "";
|
||||
$class = '';
|
||||
$function = '';
|
||||
$line = '';
|
||||
|
||||
if (isset(debug_backtrace()[$classIndex]["class"]) && debug_backtrace()[$classIndex]["class"] != "")
|
||||
if (isset(debug_backtrace()[$classIndex]['class']) && debug_backtrace()[$classIndex]['class'] != '')
|
||||
{
|
||||
$class = debug_backtrace()[$classIndex]["class"];
|
||||
$class = debug_backtrace()[$classIndex]['class'];
|
||||
}
|
||||
|
||||
if (isset(debug_backtrace()[$functionIndex]["function"]) && debug_backtrace()[$functionIndex]["function"] != "")
|
||||
if (isset(debug_backtrace()[$functionIndex]['function']) && debug_backtrace()[$functionIndex]['function'] != '')
|
||||
{
|
||||
$function = debug_backtrace()[$functionIndex]["function"];
|
||||
$function = debug_backtrace()[$functionIndex]['function'];
|
||||
}
|
||||
|
||||
if (isset(debug_backtrace()[$lineIndex]["line"]) && debug_backtrace()[$lineIndex]["line"] != "")
|
||||
if (isset(debug_backtrace()[$lineIndex]['line']) && debug_backtrace()[$lineIndex]['line'] != '')
|
||||
{
|
||||
$line = debug_backtrace()[$lineIndex]["line"];
|
||||
$line = debug_backtrace()[$lineIndex]['line'];
|
||||
}
|
||||
|
||||
return $this->format($class, $function, $line);
|
||||
|
||||
Reference in New Issue
Block a user