alexandresalome/doctrine-extra-bundle
最新稳定版本:v0.3.4
Composer 安装命令:
composer require alexandresalome/doctrine-extra-bundle
包简介
Extra features for Doctrine, as a Symfony bundle
README 文档
README
Graph tool for Doctrine. Relies on Graphviz.
Installation
Install the latest version with
composer require --dev alexandresalome/doctrine-extra-bundle
Then, enable the bundle by adding the following line in the app/AppKernel.php
file of your project:
// 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. $bundles[] = new Alex\DoctrineExtraBundle\AlexDoctrineExtraBundle(); } // ... } // ... }
Usage
Dump entity manager schema as graph
php app/console doctrine:mapping:graphviz
If you want to create a PDF file out of it, with Linux:
.. code-block:: bash
php app/console doctrine:mapping:graphviz | dot -Tpdf -oout.pdf
xdg-open out.pdf
Development
Generate sample graphs
A set of sample entities are available to test internally the schema generations. You can generate the graph for any of the samples (located in Tests/Fixtures) by running:
./Resources/bin/graph Simple | dot -Tpdf -oout.pdf
xdg-open out.pdf
统计信息
- 总下载量: 270.22k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 48
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-10-16
