{"id":17158258,"url":"https://github.com/jaytaph/typearray","last_synced_at":"2025-04-13T13:32:37.118Z","repository":{"id":64607229,"uuid":"576890422","full_name":"jaytaph/typearray","owner":"jaytaph","description":"Typed Array","archived":false,"fork":false,"pushed_at":"2023-06-08T08:21:12.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-27T04:33:23.792Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaytaph.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":"2022-12-11T10:24:36.000Z","updated_at":"2024-07-08T08:27:23.000Z","dependencies_parsed_at":"2023-01-31T19:01:47.212Z","dependency_job_id":null,"html_url":"https://github.com/jaytaph/typearray","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaytaph%2Ftypearray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaytaph%2Ftypearray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaytaph%2Ftypearray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaytaph%2Ftypearray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaytaph","download_url":"https://codeload.github.com/jaytaph/typearray/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248720970,"owners_count":21151020,"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-10-14T22:10:58.571Z","updated_at":"2025-04-13T13:32:37.091Z","avatar_url":"https://github.com/jaytaph.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typed Array\n\nSimple wrapper around property-accessor to fetch elements in a typed way. This package is created because I was fiddling around with a lot of json-arrays \nthat were not typed and phpstan had a big issue with that.\n\nSo, instead of having `mixed[] $myarray`, we can use `TypeArray`, and fetch elements with:\n\n```\n$arr = new TypeArray(['foo' =\u003e 'string', 'bar' =\u003e 4 ]);\n\n$arr-\u003egetString('[foo]');  // always returns a string\n$arr-\u003egetString('[notexists]', 'defaultval');   // Returns default val when not found\n\n$arr-\u003egetInt('[bar]');  // returns int(4)\n$arr-\u003egetInt('[foo]');  // Returns InvalidTypeException as this element is a string, not an int\n\n```\n\nSee symfony propertyaccess component for the path syntax used.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaytaph%2Ftypearray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaytaph%2Ftypearray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaytaph%2Ftypearray/lists"}