{"id":22131457,"url":"https://github.com/alaaattya/transform-unicorn","last_synced_at":"2025-09-23T23:35:52.989Z","repository":{"id":150450247,"uuid":"98738589","full_name":"AlaaAttya/transform-unicorn","owner":"AlaaAttya","description":"A universal data transformer/hyderator","archived":false,"fork":false,"pushed_at":"2017-07-29T14:59:01.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T14:46:10.977Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlaaAttya.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-29T14:44:11.000Z","updated_at":"2017-07-29T17:56:25.000Z","dependencies_parsed_at":"2023-05-26T14:16:25.219Z","dependency_job_id":null,"html_url":"https://github.com/AlaaAttya/transform-unicorn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlaaAttya%2Ftransform-unicorn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlaaAttya%2Ftransform-unicorn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlaaAttya%2Ftransform-unicorn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlaaAttya%2Ftransform-unicorn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlaaAttya","download_url":"https://codeload.github.com/AlaaAttya/transform-unicorn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245240829,"owners_count":20583102,"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-12-01T18:34:19.726Z","updated_at":"2025-09-23T23:35:47.955Z","avatar_url":"https://github.com/AlaaAttya.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Universal transformer unicorn\n=============================\n\nThis package is used to transform an array to it's related model and transform a model object to an array.\n\nfor example, if you have a `Person` model and you need to create a new object of that model with specific data\nyou might use the following snippet\n\n```php\n$transformer = new Transformer\\BaseTransformStrategy();\n\n$testArray = [\n    'name' =\u003e 'alaa',\n    'email' =\u003e 'alaa.attya91@gmail.com'\n];\n\n// hydrate array to get an object\n$object = $transformer-\u003ehydrate($testArray, Person::class);\n\n```\n\nand if you need to transform that model object to array you might use the following snippet\n\n```php\n$transformer-\u003etransform($object)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falaaattya%2Ftransform-unicorn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falaaattya%2Ftransform-unicorn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falaaattya%2Ftransform-unicorn/lists"}