{"id":26893560,"url":"https://github.com/dazz/hypermedia","last_synced_at":"2025-03-31T23:58:22.244Z","repository":{"id":42954464,"uuid":"11231504","full_name":"dazz/hypermedia","owner":"dazz","description":"This project shows an example on how to add hypermedia to an object.","archived":false,"fork":false,"pushed_at":"2022-03-26T00:37:07.000Z","size":18,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T16:01:47.333Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/dazz.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}},"created_at":"2013-07-07T09:49:20.000Z","updated_at":"2014-05-03T23:44:01.000Z","dependencies_parsed_at":"2022-08-19T09:02:41.735Z","dependency_job_id":null,"html_url":"https://github.com/dazz/hypermedia","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/dazz%2Fhypermedia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dazz%2Fhypermedia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dazz%2Fhypermedia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dazz%2Fhypermedia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dazz","download_url":"https://codeload.github.com/dazz/hypermedia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246558113,"owners_count":20796696,"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":"2025-03-31T23:58:21.778Z","updated_at":"2025-03-31T23:58:22.233Z","avatar_url":"https://github.com/dazz.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"hypermedia\n==========\n\nThis project shows an example on how to add hypermedia to an object.\n\nSee tests how to set it up and build hypermedia.\n\nExample:\n\n\n```php\n# set up the POPO\n$object = new fixtures\\Person();\n$object-\u003esetId(1);\n$object-\u003esetGroupId(1);\n\n# Resource holds information about possible links\n$resource = new fixtures\\PersonResource();\n\n# The project comes with a SimpleVoter if none is set\n# It can be implemented to vote on showing links or not depending on token role\n$securityToken = new fixtures\\SecurityToken('anonymously');\n$voter = new fixtures\\Voter();\n\n$builder = Builder::createBuilder($voter, $securityToken);\n$output = $builder-\u003ebuild($resource, $object);\n```\n\nOutput:\n\n```php\nArray\n(\n    [0] =\u003e Array\n        (\n            [href] =\u003e /user\n            [rel] =\u003e users\n        )\n\n    [1] =\u003e Array\n        (\n            [href] =\u003e /groups/1\n            [rel] =\u003e group\n        )\n\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdazz%2Fhypermedia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdazz%2Fhypermedia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdazz%2Fhypermedia/lists"}