Skip to content

Commit e57304c

Browse files
committed
chore: Cleanup merge artifacts from OGM formatter and HTTP removal PRs
1 parent 6c578a0 commit e57304c

File tree

4 files changed

+11
-447
lines changed

4 files changed

+11
-447
lines changed

README.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919

2020
## See the driver in action
2121

22-
- [An implementation of the class movie database](https://github.com/neo4j-examples/movies-neo4j-php-client). It uses Slim and neo4j-php-client to build an API for the classic movie's example of neo4j.
23-
- [An complete implementation of the realworld example](https://github.com/neo4j-examples/php-laravel-neo4j-realworld-example). It uses Laravel to implement the [real world example](https://github.com/gothinkster/realworld) project, _the mother of all demo apps_.
24-
- [The friends api](https://github.com/neo4j-examples/friends-php-client) for the world's most corny example project leveraging the power of Neo4j.
22+
- [An implementation of the class movie database](https://github.com/neo4j-examples/movies-neo4j-php-client). It uses Slim and neo4j-php-client to build an API for the classic movie's example of neo4j.
23+
- [An complete implementation of the realworld example](https://github.com/neo4j-examples/php-laravel-neo4j-realworld-example). It uses Laravel to implement the [real world example](https://github.com/gothinkster/realworld) project, _the mother of all demo apps_.
24+
- [The friends api](https://github.com/neo4j-examples/friends-php-client) for the world's most corny example project leveraging the power of Neo4j.
2525

2626
For some more detailed write-ups you can refer to these blogposts:
2727

28-
- [How to build a JSON RESTful API with Neo4j, PHP and Open API](https://medium.com/neo4j/how-to-build-a-json-restful-api-with-neo4j-php-and-openapi-e45bf0a8956)
29-
- [Building a Web App with Neo4j, AuraDB and PHP](https://medium.com/neo4j/building-a-web-app-with-neo4j-auradb-and-php-990deca0d213)
30-
- [Connect to Neo4j with PHP](https://medium.com/neo4j/connect-to-neo4j-with-php-e10e24afedff)
31-
- [Enterprise level PHP and Neo4j](https://medium.com/neo4j/enterprise-level-php-and-neo4j-e467a789e6b4)
28+
- [How to build a JSON RESTful API with Neo4j, PHP and Open API](https://medium.com/neo4j/how-to-build-a-json-restful-api-with-neo4j-php-and-openapi-e45bf0a8956)
29+
- [Building a Web App with Neo4j, AuraDB and PHP](https://medium.com/neo4j/building-a-web-app-with-neo4j-auradb-and-php-990deca0d213)
30+
- [Connect to Neo4j with PHP](https://medium.com/neo4j/connect-to-neo4j-with-php-e10e24afedff)
31+
- [Enterprise level PHP and Neo4j](https://medium.com/neo4j/enterprise-level-php-and-neo4j-e467a789e6b4)
3232

3333
Or watch any of these [videos](https://www.youtube.com/watch?v=qwz5XVtbfSY&list=PL9Hl4pk2FsvViI9wmdDpRS7tZ8V6j4uJs).
3434

@@ -308,21 +308,16 @@ composer require nyholm/psr7 nyholm/psr7-server kriswallsmith/buzz
308308

309309
## Result formats/hydration
310310

311-
In order to make the results of the bolt protocol and the http uniform, the driver provides result formatters (aka hydrators). The client is configurable with these formatters. You can even implement your own.
311+
In order to make the results of the bolt protocol and the http uniform, the driver provides and summarizes the results.
312312

313-
The default formatter is the `\Laudis\Neo4j\Formatters\OGMFormatter`, which is explained extensively in [the result format section](#accessing-the-results).
313+
The default formatter is the `\Laudis\Neo4j\Formatters\SummarizedResultFormatter`, which is explained extensively in [the result format section](#accessing-the-results).
314314

315-
The driver provides three formatters by default, which are all found in the Formatter namespace:
316-
- `\Laudis\Neo4j\Formatter\BasicFormatter` which erases all the Cypher types and simply returns every value in the resulting map as a [scalar](https://www.php.net/manual/en/function.is-scalar.php), null or array value.
317-
- `\Laudis\Neo4j\Formatter\OGMFormatter` which maps the cypher types to php types as explained [here](#accessing-the-results).
318-
- `\Laudis\Neo4j\Formatter\SummarizedResultFormatter` which decorates any formatter and adds an extensive result summary.
315+
`\Laudis\Neo4j\Formatter\SummarizedResultFormatter` adds an extensive result summary.
319316

320317
The client builder provides an easy way to change the formatter:
321318

322319
```php
323-
$client = \Laudis\Neo4j\ClientBuilder::create()
324-
->withFormatter(\Laudis\Neo4j\Formatter\SummarizedResultFormatter::create())
325-
->build();
320+
$client = \Laudis\Neo4j\ClientBuilder::create()->build();
326321

327322
/**
328323
* The client will now return a result, decorated with a summary.
@@ -339,8 +334,6 @@ $summary = $summarisedResult->getSummary();
339334
$result = $summarisedResult->getResult();
340335
```
341336

342-
In order to use a custom formatter, implement the `Laudis\Neo4j\Contracts\FormatterInterface` and provide it when using the client builder.
343-
344337
## Concepts
345338

346339
The driver API described [here](https://neo4j.com/docs/driver-manual/current/) is the main target of the driver. Because of this, the client is nothing more than a driver manager. The driver creates sessions. A session runs queries through a transaction.

src/Contracts/FormatterInterface.php

Lines changed: 0 additions & 78 deletions
This file was deleted.

src/Formatter/BasicFormatter.php

Lines changed: 0 additions & 235 deletions
This file was deleted.

0 commit comments

Comments
 (0)