PHP Classes

File: helper/Debughelper.php

Recommend this page to a friend!
  Classes of stefan   PHP XML Converter   helper/Debughelper.php   Download  
File: helper/Debughelper.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP XML Converter
Transform Indesign to eBundesanzeiger XML format
Author: By
Last change:
Date: 1 year ago
Size: 852 bytes
 

Contents

Class file image Download
<?php
   
class Debughelper {
            const
DEBUG = true;
        public static function
myprint_r($var) {
                    if(
self::DEBUG==true) {
                       
$callers=debug_backtrace();
                        echo
"class: ".$callers[1]["class"];
                        echo
" ";
                        echo
"method: ".$callers[1]["function"];
                        echo
"<br />";
                        echo
"<pre>";
                       
print_r($var);
                        echo
"</pre>";
                    }
        }
                public static function
myecho($var) {
                    if(
self::DEBUG == true) {
                       
$callers=debug_backtrace();
                        echo
"class: ".$callers[1]["class"];
                        echo
" ";
                        echo
"method: ".$callers[1]["function"];
                        echo
"<br />";
                        echo
$var;
                    }
                }
    }