PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

Extension | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

Extension

Extension – How to extend PHP_UML?

Extension

PHP_UML is designed with evolution in mind. By choosing XMI as the pivot format for representing the program's structure (namespaces, classes, functions...), PHP_UML can not only interface with design tools, it can also produce other output formats, via XSL transformations (this is how the format "html" is generated).

If you only need to customize a bit the look and feel of the HTML doc, just modify the stylesheet (in /UML/Output/html/resources/style.css).

But if you need deeper changes, you will have to create your own XSL transformation. For that, start with a new folder under /UML/Output/, and put a main.xsl file inside (you can copy the one in /Output/html/). Write all your XSLT stuff in main.xsl, or split it among multiple template files (that's how PHP_UML does). Then run the method export("newFormat", "."), by passing the name of your transformation as the first parameter.

Instead of transforming XMI code, another way to create additional output formats is to program a process that exploits the metamodel that the parser has built. This is how the exportation formats htmlnew and xmi work. If you want to write your own format, you will have to program your own implementation class of PHP_UML_Output_ExporterAPI, and put it into a new folder, under the folder Output (beside the folders HtmlNew and Xmi).

For a better understanding of the program's guts, see its class diagram, available in the docs folder (PHP_UML_simplified_class_diagram.png).

If you are interested by the PHP_UML project, and want to participate, do not hesitate to contact me.

忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「Extension」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | Extension」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: