{"id":22863523,"url":"https://github.com/troytft/mapper","last_synced_at":"2025-05-02T22:16:47.975Z","repository":{"id":51714912,"uuid":"204074799","full_name":"troytft/mapper","owner":"troytft","description":"Mapper is a PHP library for mapping data to objects, type of property can be configured by annotation","archived":false,"fork":false,"pushed_at":"2021-06-05T23:18:22.000Z","size":216,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T21:32:29.511Z","etag":null,"topics":["mapper","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/troytft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-23T21:54:20.000Z","updated_at":"2021-06-05T23:18:25.000Z","dependencies_parsed_at":"2022-08-03T09:45:52.075Z","dependency_job_id":null,"html_url":"https://github.com/troytft/mapper","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troytft%2Fmapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troytft%2Fmapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troytft%2Fmapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/troytft%2Fmapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/troytft","download_url":"https://codeload.github.com/troytft/mapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251896154,"owners_count":21661428,"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":["mapper","php"],"created_at":"2024-12-13T11:16:06.763Z","updated_at":"2025-05-01T15:23:48.287Z","avatar_url":"https://github.com/troytft.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mapper\n\nMapper is a PHP library for mapping data to objects, type of property can be configured by annotation\n\n### Features\n* Supports scalar types: integer, float, boolean, string\n* Supports any nesting level using object and collection types\n* Supports work with dates\n* Allows write your own types\n* Allows define nullability of property\n\n### Usage\n```php\n\u003c?php\n\nuse Mapper\\Annotation as Mapper;\nuse Mapper\\ModelInterface;\n\nclass Movie implements ModelInterface\n{\n    /**\n     * @var string\n     *\n     * @Mapper\\StringType()\n     */\n    private $name;\n\n    /**\n     * @var Release[]|null\n     *\n     * @Mapper\\CollectionType(type=@Mapper\\ObjectType(class=\"Model\\Release\"), nullable=true)\n     */\n    private $releases;\n    \n    ... getters and setters\n}\n\n$model = new Movie();\n$data = [\n    'name' =\u003e 'Taxi 2',\n    'releases' =\u003e [\n        [\n            'country' =\u003e 'France',\n            'date' =\u003e '2000-03-25'\n        ],\n    ]\n];\n\n$mapper-\u003emap($model, $data);\n```\n\n### Requirements\n* PHP 7.4 or higher\n\n### Installation\n```bash\ncomposer require troytft/mapper\n```\n\n### Documentation\nFull documentation can be found at [`docs/main.md`](docs/main.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroytft%2Fmapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftroytft%2Fmapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftroytft%2Fmapper/lists"}