Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

edno/graphyed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

edno/graphyed

Packagist Latest Version Build Status Coverage Status GitHub license FOSSA Status

GraphYEd extends graphp/graphml for supporting yEd file format for GraphML.

It provides access to the vertices (or nodes) and edges labels :

  • $vertex->getAttribute('labels')
  • $edge->getAttribute('labels')

Please refer to GraPHP library for more details on how to manipulate graphs.

Installation

The recommended way to install this library is through Composer.

$ composer require edno/graphyed

Usage

The method getAttribute('labels') will return an array of type string.

<?php

$loader = new \edno\GraphYEd\Loader();

$graphml = file_get_contents('mygraph.graphml');

$graph = $loader->loadContents($graphml);

foreach($graph->getVertices() as $vertex) {
  print($vertex->getAttribute('labels')[0]);
}

License

Released under the terms of the permissive MIT license.

About

Extension of the GraphML library for supporting yEd GraphML files

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages