{"id":21273477,"url":"https://github.com/graphaware/neo4j-php-response-formatter","last_synced_at":"2025-03-15T12:41:54.289Z","repository":{"id":35699620,"uuid":"39976913","full_name":"graphaware/neo4j-php-response-formatter","owner":"graphaware","description":"Advanced Neo4j Http Response Formatter Extension for NeoClient","archived":false,"fork":false,"pushed_at":"2015-08-06T21:12:02.000Z","size":172,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-02-22T20:19:20.975Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphaware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-30T23:32:44.000Z","updated_at":"2018-06-07T11:18:02.000Z","dependencies_parsed_at":"2022-09-08T14:21:52.125Z","dependency_job_id":null,"html_url":"https://github.com/graphaware/neo4j-php-response-formatter","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fneo4j-php-response-formatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fneo4j-php-response-formatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fneo4j-php-response-formatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fneo4j-php-response-formatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphaware","download_url":"https://codeload.github.com/graphaware/neo4j-php-response-formatter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243732252,"owners_count":20338831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T09:14:55.815Z","updated_at":"2025-03-15T12:41:54.253Z","avatar_url":"https://github.com/graphaware.png","language":"PHP","readme":"## Neo4j Response Formatter Service for NeoClient\n\nAdvanced formatting based on the Neo4j Rest API Http Response format.\n\n### Features\n\n* Response object bootstrapped by a `PSR-7` Http Message\n* In-memory graph representation with nodes and relationships objects\n* Table format\n* Smart getter\n\n### Usage\n\nThe current usage in NeoClient is optional for avoiding backwards incompatible changes, this will become the default formatting\nservice in NeoClient v4.\n\nEnabling the GraphAware's formatting service:\n\n```php\n$client = ClientBuilder::create()\n\t-\u003eaddDefaultLocalConnection()\n\t-\u003esetAutoFormatResponse(true)\n\t-\u003eenableNewFormattingService()\n\t-\u003ebuild();\n```\n\nFrom now, all the responses you will receive will be instances of `GraphAware\\NeoClient\\Formatter\\Response`.\n\n#### Getting results\n\n```php\n$response = $client-\u003esendCypherQuery('MATCH (n) OPTIONAL MATCH (n)-[r]-() RETURN n,r');\n// here we only expect one result\n$result = $response-\u003egetResult();\n\n// The result object holds nodes, relationships and table format\n\n$nodes = $result-\u003egetNodes();\n$relationships = $result-\u003egetRelationships();\n\n// If you expect multiple results, like for preparedTransactions\n\n$results = $response-\u003egetResults();\n\n// Using the table\n\n$table = $result-\u003egetTable();\n$rows = $table-\u003egetRows();\nprint_r($rows);\n\n```\n\nMore doc to come...\n\n--- \n\nLicense MIT\n\n---","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphaware%2Fneo4j-php-response-formatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphaware%2Fneo4j-php-response-formatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphaware%2Fneo4j-php-response-formatter/lists"}