2017 © Pedro Peláez
 

library xdebug-trace-reader

image

leadtech/xdebug-trace-reader

  • Tuesday, May 31, 2016
  • by DaanBiesterbos
  • Repository
  • 1 Watchers
  • 1 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

XDebug Trace Reader

The goal of this package is to help you read large trace files and and to offer build in features to make it easier to to interpret each entry. Most examples I could find on the web would simply create a huge array. I don't like this approach. The goal of this package is to implement a basic reader capable of processing large files. For each line the reader will instantiate an object. The latter will add a little bit of overhead. I think this is acceptable since we are processing only one object per iteration., (*1)

What this package is not

This package does not analyze the contents of the trace file. The aim is to help users develop their own interpreter without having to worry about the actual reading., (*2)

Creating the reader

For more examples go to the examples folder., (*3)

// Create reader from file path
$reader = EntryReader::fromFile(new EntryFactory, __DIR__ . '/../assets/trace.out.xt');

// Or create reader from a pointer
$fp = fopen(__DIR__ . '/../assets/trace.out.xt');
$reader = new EntryReader(new EntryFactory, $fp);

Reading the file

/** @var \Leadtech\XDebugTraceReader\Trace\TraceEntryInterface $entry */
while($entry = $reader->read()) {
    var_dump($entry);
}

The Versions

31/05 2016

dev-master

9999999-dev

  Sources   Download

proprietary

The Requires

  • php >=5.4.0

 

The Development Requires

by Daan Biesterbos