{"id":14970816,"url":"https://github.com/graphaware/neo4j-php-commons","last_synced_at":"2025-08-13T18:42:41.011Z","repository":{"id":49712909,"uuid":"44069312","full_name":"graphaware/neo4j-php-commons","owner":"graphaware","description":"Common Utility Classes for using Neo4j in PHP","archived":false,"fork":false,"pushed_at":"2023-11-15T15:31:38.000Z","size":93,"stargazers_count":24,"open_issues_count":1,"forks_count":10,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-01-31T19:27:36.368Z","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":"other","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-11T20:54:47.000Z","updated_at":"2022-09-15T19:31:57.000Z","dependencies_parsed_at":"2024-06-18T13:55:06.770Z","dependency_job_id":"7a3217b2-8c9e-4627-bb1e-bd1a470a2702","html_url":"https://github.com/graphaware/neo4j-php-commons","commit_stats":{"total_commits":80,"total_committers":3,"mean_commits":"26.666666666666668","dds":"0.13749999999999996","last_synced_commit":"a1aef65e3275c006a9c91ca8be7d800e8391b514"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fneo4j-php-commons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fneo4j-php-commons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fneo4j-php-commons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fneo4j-php-commons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphaware","download_url":"https://codeload.github.com/graphaware/neo4j-php-commons/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238337394,"owners_count":19455301,"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-09-24T13:44:11.464Z","updated_at":"2025-02-11T17:32:07.597Z","avatar_url":"https://github.com/graphaware.png","language":"PHP","readme":"# GraphAware PHP Neo4j Common\n\n## Library with common utility classes for Neo4j\n\n[![Build Status](https://travis-ci.org/graphaware/neo4j-php-commons.svg)](https://travis-ci.org/graphaware/neo4j-php-commons)\n[![Latest Stable Version](https://poser.pugx.org/graphaware/neo4j-common/version)](https://packagist.org/packages/graphaware/neo4j-common)\n\n### Installation\n\nRequire the dependencies in your application :\n\n```bash\ncomposer require graphaware/neo4j-common\n```\n\n---\n\n### Graph\n\n#### Label\n\nObject representation of a Node Label.\n\n```php\n\nuse GraphAware\\Common\\Graph\\Label;\n\n$label = new Label(\"User\");\necho $label-\u003egetName(); // Returns (string) \"User\"\n\n// or static construction\n\n$label = Label::label(\"User\");\n```\n\n#### Node\n\nObject Representation of a Node. The node object extends `PropertyBag`.\n\n```php\n\nuse GraphAware\\Common\\Graph\\Node;\n\n$node = new Node(1, array(\"User\", \"Person\"));\n$node-\u003egetId(); // Returns (int) 1\n$node-\u003egetLabels(); // Returns an array of \\GraphAware\\Common\\Graph\\Label objects\n```\n\n#### Relationship\n\nObject Representation of a Relationship. The relationship object extends `PropertyBag`.\n\n```php\nuse GraphAware\\Common\\Graph\\Relationship;\n\n$rel = new Relationship(1, RelationshipType::withName(\"RELATES\"), $node, $node2);\necho $rel-\u003egetType(); // Returns (string) \"RELATES\"\nvar_dump($rel-\u003eisType(RelationshipType::withName(\"RELATES\"))); // Returns (bool) true\n```\n\n#### Direction (Enum) : representation of a Relationship Direction\n\n```php\n\nuse GraphAware\\Common\\Graph\\Direction;\n\n$direction = new Direction(Direction::INCOMING);\necho $direction; // Returns (string) \"INCOMING\"\n\n// Or static call construction\n\n$direction = Direction::OUTGOING;\necho $direction; // Returns (string) \"OUTGOING\"\n```\n\nValid values are `INCOMING`, `OUTGOING` and `BOTH`.\n\n#### RelationshipType\n\nObject representation of a relationship type.\n\n```php\nuse GraphAware\\Common\\Graph\\RelationshipType;\n\n$relType = RelationshipType::withName(\"FOLLOWS\");\necho $relType-\u003egetName(); // Returns (string) \"FOLLOWS\"\necho (string) $relType; // implements __toString method : Returns (string) \"FOLLOWS\"\n```\n---\n\n### Cypher\n\n#### Statement and StatementCollection\n\nUtility classes representing Cypher's statements. Both `Statement` and `StatementCollection` classes are \n`taggable`.\n\nContains also `StatementInterface` and `StatementCollectionInterface` used in most GraphAware's PHP libraries.\n\n##### Statement\n\nRepresents a Cypher statement with a query and an array of parameters. Also the Statement accepts a `tag` argument default to null;\n\n```php\n\nuse GraphAware\\Common\\Cypher\\Statement;\n\n$statement = Statement::create(\"MATCH (n) WHERE id(n) = {id} RETURN n\", array(\"id\" =\u003e 324));\n\necho $statement-\u003egetQuery(); // Returns (string) \"MATCH (n) WHERE id(n) = {id} RETURN n\"\necho count($statement-\u003egetParameters()); // Returns (int) 1\n```\n\n##### StatementCollection\n\nRepresents a collection of `Statement` objects. Is also Taggable.\n\n```php\n\nuse GraphAware\\Common\\Cypher\\Statement\n    GraphAware\\Common\\Cypher\\StatementCollection;\n\n$collection = new StatementCollection();\n$collection-\u003eadd(Statement::create(\"MATCH (n) RETURN count(n)\"));\n\nprint_r($collection-\u003egetStatements());\necho $collection-\u003eisEmpty();\n```\n\n---\n\n## License\n\n### Apache License 2.0\n\n```\nCopyright 2015 Graphaware Limited\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n--- \n\n## Support\n\nStandard Community Support through the Github Issues and PR's workflow.\n\nEnterprise support via your first level support contact.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphaware%2Fneo4j-php-commons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphaware%2Fneo4j-php-commons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphaware%2Fneo4j-php-commons/lists"}