Skip to content

uml-php is a library for crawling and generating data structors from project's classes

License

Notifications You must be signed in to change notification settings

GitHubHubus/uml-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uml-php

uml-php is a library for crawling and generating data structors from project's classes. Information about classes based on doc comments and signature of classes, methods, properties and etc. Information about classes is represented by a number of nodes:

Install

composer require ok/uml-php --dev

Usage

Simple way to use it is create a some cli command

<?php

namespace Tests;

use OK\Uml\Uml;
use OK\Uml\Parser\Parser;
use OK\Uml\Serializer\JsonSerializer;

class Test {
    public function __construct() {
        require_once __DIR__ . '/vendor/autoload.php';
        $uml = new Uml('path_to_project', new Parser(), new JsonSerializer());
        
        echo $uml->get();
    }
}

$test = new Test();

run this using terminal and write output in file

$ php test.php >> file

The result file will contains a data about project's classes, serialized to JSON. You can write and use your own serializer if needed. If you will use default serializer you can interpret data via simple uml-viewer. But it is ugly right now.

If you want to get data as is array of php nodes, just use getRaw method in your code

$uml->getRaw();

About

uml-php is a library for crawling and generating data structors from project's classes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages