{"id":26747323,"url":"https://github.com/dschoenbauer/dot-notation","last_synced_at":"2025-10-24T07:52:25.783Z","repository":{"id":56972793,"uuid":"74768311","full_name":"dschoenbauer/dot-notation","owner":"dschoenbauer","description":"Given a complicated data structure, allows easy and safe access to data via dot notation. This library is a compilation of other Dot Notation libraries, taking the best feature from each and incorporating them here.","archived":false,"fork":false,"pushed_at":"2017-05-03T16:15:28.000Z","size":659,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-02-25T15:06:58.186Z","etag":null,"topics":["composer","dot-notation","packagist","psr-4"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dschoenbauer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-25T15:13:47.000Z","updated_at":"2017-02-28T11:22:23.000Z","dependencies_parsed_at":"2022-08-21T07:10:28.846Z","dependency_job_id":null,"html_url":"https://github.com/dschoenbauer/dot-notation","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dschoenbauer%2Fdot-notation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dschoenbauer%2Fdot-notation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dschoenbauer%2Fdot-notation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dschoenbauer%2Fdot-notation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dschoenbauer","download_url":"https://codeload.github.com/dschoenbauer/dot-notation/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245999636,"owners_count":20707574,"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":["composer","dot-notation","packagist","psr-4"],"created_at":"2025-03-28T09:17:56.621Z","updated_at":"2025-10-24T07:52:20.762Z","avatar_url":"https://github.com/dschoenbauer.png","language":"PHP","readme":"# Dot Notation\n\n[![Build Status](https://travis-ci.org/dschoenbauer/dot-notation.svg?branch=develop)](https://travis-ci.org/dschoenbauer/dot-notation)\n[![Coverage Status](https://coveralls.io/repos/github/dschoenbauer/dot-notation/badge.svg?branch=develop)](https://coveralls.io/github/dschoenbauer/dot-notation?branch=develop)\n[![License](https://img.shields.io/packagist/l/dschoenbauer/dot-notation.svg)](https://github.com/dschoenbauer/dot-notation)\n[![Downloads](https://img.shields.io/packagist/dt/dschoenbauer/dot-notation.svg)](https://packagist.org/packages/dschoenbauer/dot-notation)\n[![Version](https://img.shields.io/packagist/v/dschoenbauer/dot-notation.svg)](https://github.com/dschoenbauer/dot-notation/releases)\n\n\n[![License](https://img.shields.io/packagist/l/dschoenbauer/dot-notation.svg)](https://github.com/dschoenbauer/dot-notation)\n[![Downloads](https://img.shields.io/packagist/dt/dschoenbauer/dot-notation.svg)](https://packagist.org/packages/dschoenbauer/dot-notation)\n[![Version](https://img.shields.io/packagist/v/dschoenbauer/dot-notation.svg)](https://github.com/dschoenbauer/dot-notation/releases)\n\n\n## Purpose\nSimplifies access to large array structures\n\n## Installation\n````\n    composer require dschoenbauer/dot-notation\n````\n\n## Testing\n\n````\n    ./vendor/bin/phpunit tests\n````\n\n\n## Example\n\n```\nuse DSchoenbauer\\DotNotation\\ArrayDotNotation;\n\n$mongoConnection = [ \n    'mongo' =\u003e [ \n        'default' =\u003e [  'user' =\u003e 'username', 'password' =\u003e 's3cr3t' ]\n    ]\n];\n$config = new ArrayDotNotation($mongoConnection);\n        --- or ---\n$config = ArrayDotNotation::with($mongoConnection);\n```\n\n### GET\n```\n// Get plain value\n$user = $config-\u003eget('mongo.default.user');\n/*\n    $user = 'username';\n*/ \n\n// Get array value\n$mongoDefault = $config-\u003eget('mongo.default'); \n/* \n    $mongoDefault = ['user' =\u003e 'username', 'password' =\u003e 's3cr3t'];\n*/\n```\n\n### SET\n````\n$configDump = $config-\u003eset('mongo.numbers', [2, 3, 5, 7, 11])-\u003egetData();\n/*\n    $configDump = [\n        'mongo' =\u003e [\n            'default' =\u003e [  'user' =\u003e 'username', 'password' =\u003e 's3cr3t' ],\n            'numbers' =\u003e [2, 3, 5, 7, 11]\n        ],\n        'title' =\u003e 'Dot Notation'\n    ];\n*/\n````\n\n### MERGE\n````\n$configDump = $config-\u003emerge('mongo.default', ['user' =\u003e 'otherUser','active' =\u003e true])-\u003egetData();\n/*\n    $configDump = [\n        'mongo' =\u003e [\n           'default' =\u003e [  'user' =\u003e 'otherUser', 'password' =\u003e 's3cr3t','active' =\u003e true ]\n        ],\n        'title' =\u003e 'Dot Notation'\n    ];\n*/\n````\n\n### REMOVE\n````\n$configDump = $config-\u003eremove('mongo.default.user')-\u003egetData();\n/*\n    $configDump = [\n        'mongo' =\u003e [\n           'default' =\u003e [  'password' =\u003e 's3cr3t' ]\n        ],\n        'title' =\u003e 'Dot Notation'\n    ];\n*/\n````\n\n### NOTATION TYPE\n````\n// Tired of dots? Change it.\n$user = $config-\u003esetNotationType(',')-\u003eget('mongo,default,user');\n/*\n    $user = 'username';\n*/ \n````\n\n### WITH\n````\n//Functional fluent fun\n$user = ArrayDotNotation::with($mongoConnection)-\u003eget('mongo.default.user');\n/*\n    $user = 'username';\n*/ \n\n````\n\n### HAS\n````\n// Validates that the dot notation path is present in the data.\n$isPresent = $config-\u003ehas('mongo,default,user');\n/*\n    $isPresent = true;\n*/ \n````\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdschoenbauer%2Fdot-notation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdschoenbauer%2Fdot-notation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdschoenbauer%2Fdot-notation/lists"}