Skip to content

Commit b98c989

Browse files
committed
updated README
1 parent 4eba00e commit b98c989

File tree

1 file changed

+51
-37
lines changed

1 file changed

+51
-37
lines changed

README.md

Lines changed: 51 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626

2727
An example project exists on the [neo4j github](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.
2828

29+
### Follow along on the livestream
30+
31+
We are currently running a biweekly neo4j + laravel livestream were we are building the RealWorld example app.
32+
33+
The [github repostiory can be found here](https://github.com/neo4j-examples/php-laravel-neo4j-realworld-example), there are also [recordings](https://www.youtube.com/playlist?list=PL9Hl4pk2FsvViI9wmdDpRS7tZ8V6j4uJs). The live stream usually starts at 5 PM Brussels time on Wednesday, but you can [follow Florent on twitter](https://twitter.com/fbiville) for live updates in case the schedule changes.
34+
2935
## Start your driving experience in three easy steps
3036

3137
### Step 1: install via composer
@@ -44,7 +50,7 @@ use Laudis\Neo4j\ClientBuilder;
4450
$client = ClientBuilder::create()
4551
->withDriver('bolt', 'bolt+s://user:password@localhost') // creates a bolt driver
4652
->withDriver('https', 'https://test.com', Authenticate::basic('user', 'password')) // creates an http driver
47-
->withDriver('neo4j', 'neo4j://neo4j.test.com?database=my-database', Authenticate::kerberos('token')) // creates an auto routed driver
53+
->withDriver('neo4j', 'neo4j://neo4j.test.com?database=my-database', Authenticate::oidc('token')) // creates an auto routed driver with an OpenID Connect token
4854
->withDefaultDriver('bolt')
4955
->build();
5056
```
@@ -215,27 +221,32 @@ foreach ($results as $result) {
215221

216222
Cypher values and types map to these php types and classes:
217223

218-
|Cypher|Php|
219-
|---|---|
220-
|null|`null`|
221-
|string|`string`|
222-
|integer|`int`|
223-
|float|`float`|
224-
|boolean|`bool`|
225-
|Map|`\Laudis\Neo4j\Types\CypherMap`|
226-
|List|`\Laudis\Neo4j\Types\CypherList`|
227-
|Point|`\Laudis\Neo4j\Contracts\PointInterface` *|
228-
|Date|`\Laudis\Neo4j\Types\Date`|
229-
|Time|`\Laudis\Neo4j\Types\Time`|
230-
|LocalTime|`\Laudis\Neo4j\Types\LocalTime`|
231-
|DateTime|`\Laudis\Neo4j\Types\DateTime`|
232-
|LocalDateTime|`\Laudis\Neo4j\Types\LocalDateTime`|
233-
|Duration|`\Laudis\Neo4j\Types\Duration`|
234-
|Node|`\Laudis\Neo4j\Types\Node`|
235-
|Relationship|`\Laudis\Neo4j\Types\Relationship`|
236-
|Path|`\Laudis\Neo4j\Types\Path`|
237-
238-
(*) A point can be one of four types implementing PointInterface: `\Laudis\Neo4j\Types\CartesianPoint` `\Laudis\Neo4j\Types\Cartesian3DPoint` `\Laudis\Neo4j\Types\WGS84Point` `\Laudis\Neo4j\Types\WGS843DPoint`
224+
| Cypher | Php |
225+
|----------------|-----------------------------------------------|
226+
| null | * `null` |
227+
| string | * `string` |
228+
| integer | * `int` |
229+
| float | * `float` |
230+
| boolean | * `bool` |
231+
| Map | * `\Laudis\Neo4j\Types\CypherMap` |
232+
| List | * `\Laudis\Neo4j\Types\CypherList` |
233+
| Point | * `\Laudis\Neo4j\Contracts\PointInterface` ** |
234+
| Date | * `\Laudis\Neo4j\Types\Date` |
235+
| Time | * `\Laudis\Neo4j\Types\Time` |
236+
| LocalTime | * `\Laudis\Neo4j\Types\LocalTime` |
237+
| DateTime | * `\Laudis\Neo4j\Types\DateTime` |
238+
| DateTimeZoneId | * `\Laudis\Neo4j\Types\DateTimeZoneId` |
239+
| LocalDateTime | * `\Laudis\Neo4j\Types\LocalDateTime` |
240+
| Duration | * `\Laudis\Neo4j\Types\Duration` |
241+
| Node | `\Laudis\Neo4j\Types\Node` |
242+
| Relationship | `\Laudis\Neo4j\Types\Relationship` |
243+
| Path | `\Laudis\Neo4j\Types\Path` |
244+
245+
(*) These items can also be used as parameters in the bolt protocol and will automatically be converted by the driver, so they can be used in Cypher.
246+
247+
Besides these examples, `\DateTimeInterface` will map to `DateTimeZoneId` in Cypher. An empty or list-type `array` will be converted to a cypher `List`, and an `associative array` will be converted to a `map`.
248+
249+
(**) A point can be one of four types implementing PointInterface: `\Laudis\Neo4j\Types\CartesianPoint` `\Laudis\Neo4j\Types\Cartesian3DPoint` `\Laudis\Neo4j\Types\WGS84Point` `\Laudis\Neo4j\Types\WGS843DPoint`
239250

240251
## Diving Deeper
241252

@@ -278,11 +289,14 @@ $client->run('MATCH (x) WHERE x.slug in $listOrMap RETURN x', ['listOrMap' => []
278289
* A Neo4j database (minimum version 3.5)
279290
* ext-bcmath *
280291
* ext-json **
292+
* ext-sockets ***
281293

282294
(*) Needed to implement the bolt protocol
283295

284296
(**) Needed to implement the http protocol
285297

298+
(***) Can be installed for optimal bolt protocol performance
299+
286300

287301
If you plan on using the HTTP drivers, make sure you have [psr-7](https://www.php-fig.org/psr/psr-7/), [psr-17](https://www.php-fig.org/psr/psr-17/) and [psr-18](https://www.php-fig.org/psr/psr-18/) implementations included into the project. If you don't have any, you can install them via composer:
288302

@@ -395,26 +409,26 @@ bolt://localhost:7687?database=neo4j
395409

396410
This library supports three drivers: bolt, HTTP and neo4j. The scheme part of the url determines the driver.
397411

398-
| driver| scheme| valid certificate | self-signed certificate | function |
399-
|-------|-------|-------------------|-----------------------------------------------|-------------------------------|
400-
| neo4j | neo4j | neo4j+s | neo4j+ssc | Client side routing over bolt |
401-
| bolt | bolt | bolt+s | bolt+ssc | Single server over bolt |
402-
| http | http | https | configured through PSR Client implementation | Single server over HTTP |
412+
| driver | scheme | valid certificate | self-signed certificate | function |
413+
|--------|--------|-------------------|----------------------------------------------|-------------------------------|
414+
| neo4j | neo4j | neo4j+s | neo4j+ssc | Client side routing over bolt |
415+
| bolt | bolt | bolt+s | bolt+ssc | Single server over bolt |
416+
| http | http | https | configured through PSR Client implementation | Single server over HTTP |
403417

404418
### Configuration objects
405419

406420
A driver, session and transaction can be configured using configuration objects. An overview of the configuration options can be found here:
407421

408-
| name | concept | description | class |
409-
|------|---------|-------------|-------|
410-
| user agent | driver | The user agent used to identify the client to the neo4j server. | `DriverConfiguration` |
411-
| Http PSR Bindings | driver | The relevant PSR implementation used by the driver when using the HTTP protocol. | `DriverConfiguration` |
412-
| database | session | The database to connect to. | `SessionConfiguration` |
413-
| fetch size | session | The amount of rows to fetch at once. (experimental) | `SessionConfiguration` |
414-
| access mode | session | The default mode when accessing the server. | `SessionConfiguration` |
415-
| bookmarks | session | The bookmarks used in the session. (experimental) | `SessionConfiguration` |
416-
| metadata | transaction | The metadata used during the transaction. (experimental) | `TransactionConfiguration` |
417-
| timeout | transaction | The maximum amount of time before timing out. | `TransactionConfiguration` |
422+
| name | concept | description | class |
423+
|-------------------|-------------|----------------------------------------------------------------------------------|----------------------------|
424+
| user agent | driver | The user agent used to identify the client to the neo4j server. | `DriverConfiguration` |
425+
| Http PSR Bindings | driver | The relevant PSR implementation used by the driver when using the HTTP protocol. | `DriverConfiguration` |
426+
| database | session | The database to connect to. | `SessionConfiguration` |
427+
| fetch size | session | The amount of rows to fetch at once. | `SessionConfiguration` |
428+
| access mode | session | The default mode when accessing the server. | `SessionConfiguration` |
429+
| bookmarks | session | The bookmarks used in the session. (experimental) | `SessionConfiguration` |
430+
| metadata | transaction | The metadata used during the transaction. (experimental) | `TransactionConfiguration` |
431+
| timeout | transaction | The maximum amount of time before timing out. | `TransactionConfiguration` |
418432

419433
Code Example:
420434

0 commit comments

Comments
 (0)