export() public static method

Returns a parseable string representation of a variable.
public static export ( mixed $var ) : string
$var mixed The variable to export.
return string The exported contents.
Example #1
0
 public static function __callStatic($priority = 'debug', $params = array())
 {
     $trace = Debugger::trace(array('format' => 'array', 'depth' => 3, 'includeScope' => false));
     $trace = $trace[2];
     if (empty($trace)) {
         throw UnexpectedValueException('Could not trace method');
     }
     $trace = array('method' => $trace['functionRef'], 'line' => $trace['line'], 'file' => $trace['file']);
     $message = "//////////// {$trace['file']}:{$trace['line']} -> {$trace['method']} ////////////\n";
     foreach ($params as $param) {
         $dump = Debugger::export($param);
         $message = "{$message}{$dump}\n";
     }
     return parent::write($priority, $message);
 }