{"id":26905135,"url":"https://github.com/jimdo/jimphle-data-structure","last_synced_at":"2025-04-01T10:56:12.314Z","repository":{"id":14162498,"uuid":"16868427","full_name":"Jimdo/jimphle-data-structure","owner":"Jimdo","description":"Jimdo PHP library extraction of data-structure component","archived":false,"fork":false,"pushed_at":"2022-03-10T09:55:52.000Z","size":29,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":115,"default_branch":"master","last_synced_at":"2025-03-16T06:36:40.879Z","etag":null,"topics":["owner-team-creator"],"latest_commit_sha":null,"homepage":"","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/Jimdo.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":"2014-02-15T18:08:33.000Z","updated_at":"2022-03-10T09:55:54.000Z","dependencies_parsed_at":"2022-07-08T06:41:02.689Z","dependency_job_id":null,"html_url":"https://github.com/Jimdo/jimphle-data-structure","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jimdo%2Fjimphle-data-structure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jimdo%2Fjimphle-data-structure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jimdo%2Fjimphle-data-structure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jimdo%2Fjimphle-data-structure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jimdo","download_url":"https://codeload.github.com/Jimdo/jimphle-data-structure/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246628272,"owners_count":20808106,"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":["owner-team-creator"],"created_at":"2025-04-01T10:56:11.678Z","updated_at":"2025-04-01T10:56:12.302Z","avatar_url":"https://github.com/Jimdo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jimphle-data-structure\n\nJimdo PHP library extraction of data-structure component.\n\nThis comes with a Map and a Vector and a Null implementation of the BaseInterface.\nFacts:\n * Immutable\n * Throws InvalidPropertyException on none-existing keys\n * Is able convert complete trees of different data structures to json\n * Is sometimes not very efficient.\n   For example the fromArray method uses the Vector::isSequentialList check which copies the complete array in memory\n\nA Vector is a representation of an array with sequential numeric indexes:\n```php\n$vector = new \\Jimphle\\DataStructure\\Vector(\n    array(\n        'foo',\n        'bar'\n    )\n);\n\necho $vector[1];\n```\n\nA Map is a representation of an array with key and value:\n```php\n$map = new \\Jimphle\\DataStructure\\Map(\n    array(\n        'foo' =\u003e 'bar'\n    )\n);\necho $map-\u003efoo;\n\n$map = new \\Jimphle\\DataStructure\\Map(\n    array(\n        'foo-1' =\u003e 'bar'\n    )\n);\necho $map['foo-1'];\n```\n\nConvert an object tree to json:\n```php\n$map = new \\Jimphle\\DataStructure\\Map(\n    array(\n        'who?' =\u003e new \\Jimphle\\DataStructure\\Vector(\n            array(\n                new Jimphle\\DataStructure\\Map(\n                    array(\n                        'foo' =\u003e 'bar'\n                    )\n                )\n            )\n        )\n    )\n);\necho $map-\u003etoJson();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimdo%2Fjimphle-data-structure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimdo%2Fjimphle-data-structure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimdo%2Fjimphle-data-structure/lists"}