<?php /** * The Zoo * $Id: misc.php,v 1.1 2006-12-03 23:20:08 marand Exp $ */ interface iComparable { /** * Compare the current instance * * @param iComparable $other */ public function cmp(iComparable $other); } function get_temp_dir() { return 'e:/src/OsinetOffice/tmp'; } function output_encoder($s) { return iconv('UTF-8', 'IBM850', $s); } // Activate the OB handler: ob_start("output_encoder", 2); /** * automatically find the glade file for a class file * */ function load_glade() { return new GladeXML(basename($_SERVER['PHP_SELF'], 'php') . 'glade'); } /** * returns the name of the invoking function/method * if it's a method, it is prefixed by the class name * * @return string */ function func_name() { $trace = debug_backtrace(); $func = $trace[1]['function']; if (isset($trace[1]['class'])) $func = $trace[1]['class'] . '::' . $func; return $func; }