PHP code example of infinityloop-dev / graphpinator-printer

1. Go to this page and download the library: Download infinityloop-dev/graphpinator-printer 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/ */

    

infinityloop-dev / graphpinator-printer example snippets


$schema; // instance of \Graphpinator\Typesystem\Schema
$printer = new \Graphpinator\Printer\Printer();

echo $printer->printSchema($schema);

$schema; // instance of \Graphpinator\Typesystem\Schema
$printer = new \Graphpinator\Printer\Printer(
    new \Graphpinator\Printer\HtmlVisitor( // different format
        new \Graphpinator\Printer\ImplicitInheritanceFieldCollector(), // enable implicit inheritance
    ),
    new \Graphpinator\Printer\TypeKindSorter(), // different sorter
);

echo $printer->printSchema($schema);