janalis/doctrineviz

渲染 Doctrine2 映射数据库的图形表示

安装: 70

依赖关系: 0

建议者: 0

安全性: 0

星标: 4

关注者: 3

分支: 1

开放性问题: 1

类型:symfony-bundle

v0.3.1 2017-11-30 22:15 UTC

README

Build Status Coverage Status SensioLabs Insight Scrutinizer Code Quality Style CI

渲染 Doctrine2 映射数据库的图形表示。

示例

Example

安装

通过 composer 需求包

$ composer require --dev janalis/doctrineviz

然后,在项目的 app/AppKernel.php 文件中添加以下行以启用该包

// app/AppKernel.php

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        //...
        if (in_array($this->getEnvironment(), ['dev', 'test'])) {
            // ...
            // Because the vendor code could be not present, you should check if the bundle is here before using it.
            new Janalis\Doctrineviz\DoctrinevizBundle(),
        }


        // ...
    }

    // ...
}

为了能够使用图形绘制功能,您必须安装 GraphViz (dot 可执行文件)。

Mac OS

$ brew install graphviz

Ubuntu

$ sudo apt install -y graphviz

Windows

Windows 用户可以从此处下载 GraphViZ for Windows

使用方法

在 symfony 项目中

$ php app/console doctrine:generate:viz --help

鸣谢