<?php

class StackFrame
{

  public $object;

  public $file;

  public $line;

  public $function;

  public $class;

  public $type;

  public $args;

  public static function getFrames($provide_object = false)
  {
    return array_map ( function ($item)
    {
      $f = new StackFrame ();
      foreach ( $item as $k => $v )
        $f->$k = $v;
      return $f;
    }, debug_backtrace ( $provide_object ) );
  }
}