edno / graphyed
This package is abandoned and no longer maintained.
No replacement package was suggested.
Extension of the GraphML library for supporting yEd GraphML files
0.2.1
2019-04-22 12:18 UTC
Requires
- php: >=7.1
- graphp/graphml: *
Requires (Dev)
- php-coveralls/php-coveralls: ^2.1
- phpunit/phpunit: ~4.0
This package is auto-updated.
Last update: 2021-09-21 15:47:12 UTC
README
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.