I think it may make sense to expose the results through an explicit API something along the lines of:

```php
$alg = new FloydWarshall($graph);
$result = $alg->createResult();

$edges = $result->getEdges();
$paths = $result->getPaths();
// ...
```

This has the benefit of being explicit about what it does and it will not introduce any unexpected side-effects once you start modifying your Graph after calculating the result. The `createResult()` makes it clear that it stores the intermediary result that will only be valid for the current state of the graph, e.g. consider:

```php
$result = $alg->createResult();

$graph->getVertex(1)->destroy();
$graph->createVertex(1000)->createEdgeTo($graph->getVertex(2));
```

I'm not perfectly happy with the naming though, so perhaps you can come up with some better names? :)