pyrex-fwi / plantuml
一些plantuml poc
v0.1.1
2020-12-24 10:40 UTC
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.17
- phpunit/phpunit: ^9.5
- psalm/plugin-phpunit: ^0.15.0
- vimeo/psalm: ^4.3
This package is auto-updated.
Last update: 2024-09-05 22:22:22 UTC
README
此包允许 创建WBS
入门
安装
composer req --dev pyrex-fwi/plantuml
示例用法
示例 1
#test-1.php <?php //create document $wbs = new WorkBreakdownStructure('RootNode'); //add subitems $wbs->addNode(new Node('Node A')); $wbs->addNode(new Node('Node B')); $wbs->addNode(new Node('Node C')); //get document as plantuml string echo $wbs->getDocumentContent();
php test-1.php > test-1.plantuml
#test-1.plantuml @startwbs <style> //... </style> * RootNode ** Node A ** Node B ** Node C @endwbs
示例 2
#test-2.php <?php //create document $wbs = new WorkBreakdownStructure('RootNode'); //add subitems $nodes[] = new Node('Node A'); $nodes[] = new Node('Node B'); $nodes[] = new Node('Node C'); $nodes[1] ->addChild(new Node('Sub B.1')) ->addChild( (new Node('Sub B.B')) ->setToLeftPosition() ->setInlineColor('green') ) ->setInlineColor('lightgray') ; $wbs ->addChildrenNodes($nodes) ->getRootNode() ->setInlineColor('pink'); echo $wbs->getDocumentContent();
php test-2.php > test-2.plantuml
#test-2.plantuml @startwbs *[#pink] RootNode ** Node A **[#lightgray] Node B *** Sub B.1 ***[#green]< Sub B.B //#This part not work at 22/12/20 ** Node C @endwbs

