From 909c124e69dd91fddb7fc4c8f2d4b7aaeb2d8a6d Mon Sep 17 00:00:00 2001 From: PrestaEdit Date: Thu, 24 Jan 2013 20:12:38 +0100 Subject: [PATCH] [*] Class Tools: enhance fd method Add the posibilities to set an error, warning, info or assert. Usage: Tools::fd('test'); Tools::fd('test', 'debug'); Tools::fd('test', 'info'); Tools::fd('test', 'warn'); Tools::fd('test', 'error'); Tools::fd('test', 'assert'); --- classes/Tools.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/classes/Tools.php b/classes/Tools.php index 8ec0b5ac0..636280a40 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -730,11 +730,16 @@ class ToolsCore * * @param object $object Object to display */ - public static function fd($object) + public static function fd($object, $type = 'log') { + $types = array('log', 'debug', 'info', 'warn', 'error', 'assert'); + + if(!in_array($type, $types)) + $type = 'log'; + echo ' '; }