{"id":36399078,"url":"https://github.com/flextype-components/arrays","last_synced_at":"2026-01-11T16:01:44.993Z","repository":{"id":62505521,"uuid":"43655751","full_name":"flextype-components/arrays","owner":"flextype-components","description":"Arrays Component contains methods that can be useful when working with arrays.","archived":false,"fork":false,"pushed_at":"2020-07-24T14:55:24.000Z","size":42,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-29T05:42:22.345Z","etag":null,"topics":["array","component","flextype","flextype-component","php"],"latest_commit_sha":null,"homepage":"http://components.flextype.org","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/flextype-components.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-04T22:50:32.000Z","updated_at":"2022-01-20T17:23:34.000Z","dependencies_parsed_at":"2022-11-02T10:02:11.292Z","dependency_job_id":null,"html_url":"https://github.com/flextype-components/arrays","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/flextype-components/arrays","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flextype-components%2Farrays","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flextype-components%2Farrays/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flextype-components%2Farrays/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flextype-components%2Farrays/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flextype-components","download_url":"https://codeload.github.com/flextype-components/arrays/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flextype-components%2Farrays/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28312133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["array","component","flextype","flextype-component","php"],"created_at":"2026-01-11T16:01:27.341Z","updated_at":"2026-01-11T16:01:44.969Z","avatar_url":"https://github.com/flextype-components.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eArrays Component\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/flextype-components/arrays/releases\"\u003e\u003cimg alt=\"Version\" src=\"https://img.shields.io/github/release/flextype-components/arrays.svg?label=version\u0026color=green\"\u003e\u003c/a\u003e \u003ca href=\"https://github.com/flextype-components/arrays\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg?color=green\" alt=\"License\"\u003e\u003c/a\u003e \u003ca href=\"https://github.com/flextype-components/arrays\"\u003e\u003cimg src=\"https://img.shields.io/github/downloads/flextype-components/arrays/total.svg?color=green\" alt=\"Total downloads\"\u003e\u003c/a\u003e \u003ca href=\"https://scrutinizer-ci.com/g/flextype-components/arrays?branch=master\"\u003e\u003cimg src=\"https://img.shields.io/scrutinizer/g/flextype-components/arrays.svg?branch=master\u0026color=green\" alt=\"Quality Score\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n### Installation\n\nWith [Composer](https://getcomposer.org):\n\n```\ncomposer require flextype-components/arrays\n```\n\n### Usage\n\n```php\nuse Flextype\\Component\\Arrays;\n```\n\n### Methods\n\n| Method | Description |\n|---|---|\n| \u003ca href=\"#array_set\"\u003e`Arrays::set()`\u003c/a\u003e | Set an array item to a given value using \"dot\" notation. If no key is given to the method, the entire array will be replaced. |\n| \u003ca href=\"#array_get\"\u003e`Arrays::get()`\u003c/a\u003e | Returns value from array using \"dot notation\". If the key does not exist in the array, the default value will be returned instead. |\n| \u003ca href=\"#array_delete\"\u003e`Arrays::delete()`\u003c/a\u003e | Deletes an array value using \"dot notation\". |\n| \u003ca href=\"#array_has\"\u003e`Arrays::has()`\u003c/a\u003e | Checks if the given dot-notated key exists in the array. |\n| \u003ca href=\"#array_dot\"\u003e`Arrays::dot()`\u003c/a\u003e | Flatten a multi-dimensional associative array with dots. |\n| \u003ca href=\"#array_undot\"\u003e`Arrays::undot()`\u003c/a\u003e | Expands a dot notation array into a full multi-dimensional array. |\n\n\u003chr\u003e\n\n#### \u003ca name=\"array_set\"\u003e\u003c/a\u003e Method: `Arrays::set()`\n\nSet an array item to a given value using \"dot\" notation. If no key is given to the method, the entire array will be replaced.\n\n```php\nArrays::set($array, 'movies.the-thin-red-line.title', 'The Thin Red Line');\n```\n\n#### \u003ca name=\"array_get\"\u003e\u003c/a\u003e Method: `Arrays::get()`\n\nReturns value from array using \"dot notation\".\nIf the key does not exist in the array, the default value will be returned instead.\n\n```php\nArrays::get($array, 'movies.the-thin-red-line.title')\n```\n\n#### \u003ca name=\"array_delete\"\u003e\u003c/a\u003e Method: `Arrays::delete()`\n\nDeletes an array value using \"dot notation\".\n\n```php\nArrays::delete($array, 'movies.the-thin-red-line');\n```\n\n#### \u003ca name=\"array_has\"\u003e\u003c/a\u003e Method: `Arrays::has()`\n\nChecks if the given dot-notated key exists in the array.\n\n```php\nif (Arrays::has($array, 'movies.the-thin-red-line')) {\n    // Do something...\n}\n```\n\n\n#### \u003ca name=\"array_dot\"\u003e\u003c/a\u003e Method: `Arrays::dot()`\n\nFlatten a multi-dimensional associative array with dots.\n\n```php\n$array = [\n            'movies' =\u003e [\n                'the_thin_red_line' =\u003e [\n                    'title' =\u003e 'The Thin Red Line',\n                    'directed_by' =\u003e 'Terrence Malick',\n                    'produced_by' =\u003e 'Robert Michael, Geisler Grant Hill, John Roberdeau',\n                    'decription' =\u003e 'Adaptation of James Jones autobiographical 1962 novel, focusing on the conflict at Guadalcanal during the second World War.',\n                ],\n            ],\n         ];\n\n$newArray = Arrays::dot($array);\n```\n\n\n#### \u003ca name=\"array_undot\"\u003e\u003c/a\u003e Method: `Arrays::undot()`\n\nExpands a dot notation array into a full multi-dimensional array.\n\n```php\n$array = [\n            'movies.the_thin_red_line.title' =\u003e 'The Thin Red Line',\n            'movies.the_thin_red_line.directed_by' =\u003e 'Terrence Malick',\n            'movies.the_thin_red_line.produced_by' =\u003e 'Robert Michael, Geisler Grant Hill, John Roberdeau',\n            'movies.the_thin_red_line.decription' =\u003e 'Adaptation of James Jones autobiographical 1962 novel, focusing on the conflict at Guadalcanal during the second World War.',\n         ];\n\n$newArray = Arrays::undot($array);\n```\n\n### License\n[The MIT License (MIT)](https://github.com/flextype-components/arrays/blob/master/LICENSE.txt)\nCopyright (c) 2020 [Sergey Romanenko](https://github.com/Awilum)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflextype-components%2Farrays","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflextype-components%2Farrays","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflextype-components%2Farrays/lists"}