定制 sebastian/object-graph 二次开发

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

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

sebastian/object-graph

最新稳定版本:3.0.1

Composer 安装命令:

composer require sebastian/object-graph

包简介

Provides useful operations on PHP object graphs

README 文档

README

Minimum PHP Version Latest Stable Version CI Status Code Coverage

Provides useful operations on PHP object graphs.

Installation

You can add this library as a local, per-project dependency to your project using Composer:

composer require sebastian/object-graph

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

composer require --dev sebastian/object-graph

Usage

Object Graph Visualization with GraphViz

<?php declare(strict_types=1);
use function SebastianBergmann\ObjectGraph\object_graph_dump;

$cart = new ShoppingCart;
$cart->add(new ShoppingCartItem('Foo', new Money(123, new Currency('EUR')), 1));
$cart->add(new ShoppingCartItem('Bar', new Money(456, new Currency('EUR')), 1));

object_graph_dump('graph.png', $cart);

Screenshot

The object_graph_dump() function supports the DOT Graph Description Language (.dot), Portable Document Format (.pdf), Portable Network Graphics (.png), and Scalable Vector Graphics (.svg) output formats.

The generation of PDF, PNG, and SVG files requires the GraphViz dot binary to be on the $PATH.

统计信息

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

GitHub 信息

  • Stars: 458
  • Watchers: 20
  • Forks: 14
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-03-15