定制 leadtech/xdebug-trace-reader 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

leadtech/xdebug-trace-reader

Composer 安装命令:

composer require leadtech/xdebug-trace-reader

包简介

README 文档

README

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.

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.

Creating the reader

For more examples go to the examples folder.

// 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);
}

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2015-08-26