Source for file CallLog.php

Documentation is available at CallLog.php

  1. <?php
  2.  
  3. /*
  4.  * Freenac LogProxy
  5.  *
  6.  * @package            FreeNAC
  7.  * @author            Seiler Thomas
  8.  * @copyright        2007 FreeNAC
  9.  * @license            http://www.gnu.org/copyleft/gpl.html   GNU Public License Version 2
  10.  * @version            SVN: $Id$
  11.  * @link            http://www.freenac.net
  12.  */
  13.  
  14. class CallLog {
  15.     protected $object;
  16.     
  17.     // we save a reference to the real object
  18.     public function __construct($object{
  19.         $this->object = $object;
  20.     }
  21.     
  22.     // here we log the return value of each method that is called in policy.inc.php
  23.     public function __call($methodName$parameters{
  24.         $value call_user_func_array(array$this->object$methodName )$parameters);
  25.         echo get_class($this->object)."->".$methodName."(".join(",",$parameters).") = ".$value ."\n"
  26.         return $value;
  27.     }
  28. };
  29.  
  30. ?>

Documentation generated on Mon, 01 Dec 2008 01:10:19 +0100 by phpDocumentor 1.4.0