プロジェクト
GitHubで見る
sebastianbergmann/object-graph
概要
PHPのオブジェクトグラフを操作するための便利な機能を提供します。
データ・分析計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- -1
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルsebastian/object-graph
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);
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.
関連プロジェクトを探す
読み込み中…