承接 innmind/object-graph 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

innmind/object-graph

Composer 安装命令:

composer require innmind/object-graph

包简介

Extract object graph out of a root object

README 文档

README

Build Status codecov Type Coverage

Small library to generate an abstract graph out of an object and its dependencies.

You can then visualize this graph by rendering it with graphviz.

Installation

composer require innmind/object-graph

Usage

use Innmind\ObjectGraph\{
    Lookup,
    Render,
    RewriteLocation\SublimeHandler,
};
use Innmind\OperatingSystem\Factory;
use Innmind\Server\Control\Server\Command;

$lookup = Lookup::of();
$render = Render::of(
    new SublimeHandler, // optional, useful to open the file in Sublime Text instead of the browser
);

$objectGraph = $lookup($theRootObjectOfYourApp); // the object could be the framework instance for example

Factory::build()
    ->control()
    ->processes()
    ->execute(
        Command::foreground('dot')
            ->withShortOption('Tsvg')
            ->withShortOption('o', 'graph.svg')
            ->withInput($render($objectGraph)),
    )
    ->unwrap()
    ->wait();

This will generate a graph.svg file representing the object graph of your application.

Note

This example uses innmind/operating-system to generate the svg file but the package is not a direct dependency, you can use the content returned by $render() however you wish.

Note

You can pass an implementation of RewriteLocation as the first argument of Render so you can rewrite the url to the class file that will be used in the generated graph (useful if you want to generate urls to open the files directly in your IDE).

统计信息

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

GitHub 信息

  • Stars: 24
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-11-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固