Skip to content

Commit 5def620

Browse files
committed
Move from legacy clue/graph to successor graphp/graph
Refs graphp/graph#166
1 parent 5cc4466 commit 5def620

File tree

11 files changed

+37
-39
lines changed

11 files changed

+37
-39
lines changed

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ the actual layouting of the graph is left up to the excelent [GraphViz](http://w
3232
Once [installed](#install), let's build and display a sample graph:
3333

3434
````php
35-
$graph = new Fhaculty\Graph\Graph();
35+
$graph = new Graphp\Graph\Graph();
3636

3737
$blue = $graph->createVertex('blue');
3838
$blue->setAttribute('graphviz.color', 'blue');
@@ -75,7 +75,7 @@ these GraphViz attributes are supported by this library and have to be assigned
7575
on the graph instance with the `graphviz.graph.` prefix like this:
7676

7777
```php
78-
$graph = new Fhaculty\Graph\Graph();
78+
$graph = new Graphp\Graph\Graph();
7979
$graph->setAttribute('graphviz.graph.bgcolor', 'transparent');
8080
```
8181

@@ -87,7 +87,7 @@ For example, the `rankdir` attribute can be used to change the orientation to
8787
horizontal mode (left to right) like this:
8888

8989
```php
90-
$graph = new Fhaculty\Graph\Graph();
90+
$graph = new Graphp\Graph\Graph();
9191
$graph->setAttribute('graphviz.graph.rankdir', 'LR');
9292

9393
$hello = $graph->createVertex('hello');
@@ -106,7 +106,7 @@ to assign a `G` here, but usually there should be no need to assign this. Among
106106
others, this may be used as the title or tooltip in SVG output.
107107

108108
```php
109-
$graph = new Fhaculty\Graph\Graph();
109+
$graph = new Graphp\Graph\Graph();
110110
$graph->setAttribute('graphviz.name', 'G');
111111

112112
$graph->createVertex('first');
@@ -120,7 +120,7 @@ library and have to be assigned on the respective vertex instance with the
120120
`graphviz.` prefix like this:
121121

122122
```php
123-
$graph = new Fhaculty\Graph\Graph();
123+
$graph = new Graphp\Graph\Graph();
124124

125125
$blue = $graph->createVertex('blue');
126126
$blue->setAttribute('graphviz.color', 'blue');
@@ -131,7 +131,7 @@ these GraphViz attributes are supported by this library and have to be assigned
131131
on the graph instance with the `graphviz.node.` prefix like this:
132132

133133
```php
134-
$graph = new Fhaculty\Graph\Graph();
134+
$graph = new Graphp\Graph\Graph();
135135
$graph->setAttribute('graphviz.node.color', 'grey');
136136

137137
$grey = $graph->createVertex('grey');
@@ -141,7 +141,7 @@ These default attributes can be overriden on each vertex instance by explicitly
141141
assigning the same attribute on the respective vertex instance like this:
142142

143143
```php
144-
$graph = new Fhaculty\Graph\Graph();
144+
$graph = new Graphp\Graph\Graph();
145145
$graph->setAttribute('graphviz.node.color', 'grey');
146146

147147
$blue = $graph->createVertex('blue');
@@ -159,7 +159,7 @@ GraphViz attributes are supported by this library and have to be assigned on the
159159
respective edge instance with the `graphviz.` prefix like this:
160160

161161
```php
162-
$graph = new Fhaculty\Graph\Graph();
162+
$graph = new Graphp\Graph\Graph();
163163

164164
$a = $graph->createVertex('a');
165165
$b = $graph->createVertex('b');
@@ -173,7 +173,7 @@ these GraphViz attributes are supported by this library and have to be assigned
173173
on the graph instance with the `graphviz.edge.` prefix like this:
174174

175175
```php
176-
$graph = new Fhaculty\Graph\Graph();
176+
$graph = new Graphp\Graph\Graph();
177177
$graph->setAttribute('graphviz.edge.color', 'grey');
178178

179179
$a = $graph->createVertex('a');
@@ -186,7 +186,7 @@ These default attributes can be overriden on each edge instance by explicitly
186186
assigning the same attribute on the respective edge instance like this:
187187

188188
```php
189-
$graph = new Fhaculty\Graph\Graph();
189+
$graph = new Graphp\Graph\Graph();
190190
$graph->setAttribute('graphviz.edge.color', 'grey');
191191

192192
$a = $graph->createVertex('a');
@@ -203,7 +203,7 @@ $blue->setAttribute('graphviz.color', 'blue');
203203
By default, GraphViz will always render the vertex ID as the label:
204204

205205
```php
206-
$graph = new Fhaculty\Graph\Graph();
206+
$graph = new Graphp\Graph\Graph();
207207

208208
$blue = $graph->createVertex('blue');
209209
```
@@ -213,7 +213,7 @@ If you assign a vertex balance, this library will automatically include a
213213
automatically assign `blue (+10)` as the label:
214214

215215
```php
216-
$graph = new Fhaculty\Graph\Graph();
216+
$graph = new Graphp\Graph\Graph();
217217

218218
$blue = $graph->createVertex('blue');
219219
$blue->setBalance(10);
@@ -224,7 +224,7 @@ custom `label` attribute. Note that any balance value will still be appended
224224
like in the previous example.
225225

226226
```php
227-
$graph = new Fhaculty\Graph\Graph();
227+
$graph = new Graphp\Graph\Graph();
228228

229229
$blue = $graph->createVertex('blue');
230230
$blue->setAttribute('graphviz.label', 'Hello world!');
@@ -239,7 +239,7 @@ so a `>` will appear as-is and will not be interpreted as HTML. See also
239239
By default, GraphViz will not render any label on an edge:
240240

241241
```php
242-
$graph = new Fhaculty\Graph\Graph();
242+
$graph = new Graphp\Graph\Graph();
243243

244244
$a = $graph->createVertex('a');
245245
$b = $graph->createVertex('b');
@@ -252,7 +252,7 @@ include a `label` attribute that includes these values. The following example
252252
will automatically assign `100` as the label for the weighted edge:
253253

254254
```php
255-
$graph = new Fhaculty\Graph\Graph();
255+
$graph = new Graphp\Graph\Graph();
256256

257257
$a = $graph->createVertex('a');
258258
$b = $graph->createVertex('b');
@@ -265,7 +265,7 @@ The following example will automatically assign `4/10` as the label for an edge
265265
with both flow and maximum capacity set:
266266

267267
```php
268-
$graph = new Fhaculty\Graph\Graph();
268+
$graph = new Graphp\Graph\Graph();
269269

270270
$a = $graph->createVertex('a');
271271
$b = $graph->createVertex('b');
@@ -279,7 +279,7 @@ The following example will automatically assign `4/∞/100` as the label for a
279279
weighted edge with a flow and unlimited capacity:
280280

281281
```php
282-
$graph = new Fhaculty\Graph\Graph();
282+
$graph = new Graphp\Graph\Graph();
283283

284284
$a = $graph->createVertex('a');
285285
$b = $graph->createVertex('b');
@@ -295,7 +295,7 @@ custom `label` attribute. Note that any flow, capacity or weight value will stil
295295
be appended like in the previous examples.
296296

297297
```php
298-
$graph = new Fhaculty\Graph\Graph();
298+
$graph = new Graphp\Graph\Graph();
299299

300300
$a = $graph->createVertex('a');
301301
$b = $graph->createVertex('b');
@@ -317,7 +317,7 @@ prevent automatic quoting and escaping, all attribute values have to be passed
317317
to the static `GraphViz::raw()` helper like this:
318318

319319
```php
320-
$graph = new Fhaculty\Graph\Graph();
320+
$graph = new Graphp\Graph\Graph();
321321

322322
$a = $graph->createVertex('Entity');
323323
$a->setAttribute('graphviz.shape', 'none');
@@ -357,7 +357,7 @@ automatic quoting and escaping, all attribute values have to be quoted manually
357357
and passed to the static `GraphViz::raw()` helper like this:
358358

359359
```php
360-
$graph = new Fhaculty\Graph\Graph();
360+
$graph = new Graphp\Graph\Graph();
361361

362362
$a = $graph->createVertex();
363363
$a->setAttribute('graphviz.shape', 'Mrecord');

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"require": {
1212
"php": ">=5.3.0",
13-
"clue/graph": "~0.9.0|~0.8.0"
13+
"graphp/graph": "dev-master#9b4ff as 1.0.0"
1414
},
1515
"require-dev": {
1616
"phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"

examples/01-simple.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require __DIR__ . '/../vendor/autoload.php';
44

5-
$graph = new Fhaculty\Graph\Graph();
5+
$graph = new Graphp\Graph\Graph();
66

77
$blue = $graph->createVertex('blue');
88
$blue->setAttribute('graphviz.color', 'blue');

examples/02-html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
require __DIR__ . '/../vendor/autoload.php';
66

7-
$graph = new Fhaculty\Graph\Graph();
7+
$graph = new Graphp\Graph\Graph();
88
$graph->setAttribute('graphviz.graph.rankdir', 'LR');
99

1010
$hello = $graph->createVertex('hello');

examples/11-uml-html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
require __DIR__ . '/../vendor/autoload.php';
66

7-
$graph = new Fhaculty\Graph\Graph();
7+
$graph = new Graphp\Graph\Graph();
88

99
$a = $graph->createVertex('Entity');
1010
$a->setAttribute('graphviz.shape', 'none');

examples/12-uml-records.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
require __DIR__ . '/../vendor/autoload.php';
66

7-
$graph = new Fhaculty\Graph\Graph();
7+
$graph = new Graphp\Graph\Graph();
88

99
$a = $graph->createVertex('Entity');
1010
$a->setAttribute('graphviz.shape', 'record');

examples/13-record-ports.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
require __DIR__ . '/../vendor/autoload.php';
66

7-
$graph = new Fhaculty\Graph\Graph();
7+
$graph = new Graphp\Graph\Graph();
88

99
$a = $graph->createVertex();
1010
$a->setAttribute('graphviz.shape', 'Mrecord');

src/Dot.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
namespace Graphp\GraphViz;
44

5-
use Graphp\GraphViz\GraphViz;
6-
use Fhaculty\Graph\Graph;
7-
use Fhaculty\Graph\Exporter\ExporterInterface;
5+
use Graphp\Graph\Graph;
6+
use Graphp\Graph\Exporter\ExporterInterface;
87

98
class Dot implements ExporterInterface
109
{

src/GraphViz.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
namespace Graphp\GraphViz;
44

5-
use Fhaculty\Graph\Attribute\AttributeBagNamespaced;
6-
use Fhaculty\Graph\Edge\Base as Edge;
7-
use Fhaculty\Graph\Edge\Directed as EdgeDirected;
8-
use Fhaculty\Graph\Exception\UnexpectedValueException;
9-
use Fhaculty\Graph\Graph;
10-
use Fhaculty\Graph\Vertex;
5+
use Graphp\Graph\Attribute\AttributeBagNamespaced;
6+
use Graphp\Graph\Edge\Base as Edge;
7+
use Graphp\Graph\Edge\Directed as EdgeDirected;
8+
use Graphp\Graph\Exception\UnexpectedValueException;
9+
use Graphp\Graph\Graph;
10+
use Graphp\Graph\Vertex;
1111

1212
class GraphViz
1313
{

src/Image.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
namespace Graphp\GraphViz;
44

5-
use Graphp\GraphViz\GraphViz;
6-
use Fhaculty\Graph\Graph;
7-
use Fhaculty\Graph\Exporter\ExporterInterface;
5+
use Graphp\Graph\Graph;
6+
use Graphp\Graph\Exporter\ExporterInterface;
87

98
class Image implements ExporterInterface
109
{

0 commit comments

Comments
 (0)