PHP code example of tasuku43 / mermaid-class-diagram
1. Go to this page and download the library: Download tasuku43/mermaid-class-diagram library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tasuku43 / mermaid-class-diagram example snippets
class SomeClassA extends SomeAbstractClass
{
private SomeClassB $someClassB;
public function __construct(private SomeClassC $someClassC, SomeClassD $someClassD, private int $int)
{
}
}
class SomeClassB
{
}
class SomeClassC
{
}
class SomeClassD
{
}
class SomeClassE
{
public function __construct(private SomeClassA $a)
{
$b = new SomeClassB;
}
public function dependAandC(SomeClassA $a): SomeClassC
{
}
}
abstract class SomeAbstractClass implements SomeInterface
{
}
interface SomeInterface
{
}
shell
$ tree
.
├── composer.json
├── composer.lock
├── src
│ ├── SomeAbstractClass.php
│ ├── SomeClassA.php
│ ├── SomeClassB.php
│ ├── SomeClassC.php
│ ├── SomeClassD.php
│ ├── SomeClassE.php
│ └── SomeInterface.php
└── vendor