{"id":18794553,"url":"https://github.com/effectra/contracts","last_synced_at":"2025-12-29T18:30:13.069Z","repository":{"id":169400969,"uuid":"645353963","full_name":"effectra/contracts","owner":"effectra","description":"Effectra\\Contracts is package provides a set of contracts/interfaces that define the standardized behavior and contracts for various components used in the Effectra application.","archived":false,"fork":false,"pushed_at":"2023-06-19T11:14:52.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-12-29T16:34:03.749Z","etag":null,"topics":["contracts","http","interface","php","requests","responsive","router","server-request","server-request-handler"],"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/effectra.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":"2023-05-25T13:16:58.000Z","updated_at":"2023-05-25T14:05:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2f601e3-c4db-4d19-bcda-b8d0de35bd39","html_url":"https://github.com/effectra/contracts","commit_stats":null,"previous_names":["effectra/contracts"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fcontracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fcontracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fcontracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Fcontracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/effectra","download_url":"https://codeload.github.com/effectra/contracts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239718694,"owners_count":19685795,"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":["contracts","http","interface","php","requests","responsive","router","server-request","server-request-handler"],"created_at":"2024-11-07T21:29:45.785Z","updated_at":"2025-12-29T18:30:13.024Z","avatar_url":"https://github.com/effectra.png","language":"PHP","readme":"# Effectra\\Contracts Package\n\nThe `Effectra\\Contracts` package provides a set of contracts/interfaces that define the standardized behavior and contracts for various components used in the Effectra application.\n\n## Installation\n\nYou can install the package via Composer by running the following command:\n\n```bash\ncomposer require effectra/contracts\n```\n\n## Usage\n\nThe package includes the following contracts/interfaces:\n\n- `Http\\RequestFoundationInterface`: Defines the contract for creating a `ServerRequestInterface` instance from global variables.\n- `Http\\ResponseFoundationInterface`: Defines the contract for sending a `ResponseInterface` instance.\n- `Http\\RouterDispatcher`: Extends `RouterInterface` and provides additional methods for adding requests and responses to the dispatcher.\n- `Http\\RouterInterface`: Defines the contract for a router that dispatches server requests and returns responses.\n\nTo use any of these interfaces, simply implement them in your classes:\n\n```php\nuse Effectra\\Contracts\\Http\\RequestFoundationInterface;\nuse Psr\\Http\\Message\\ServerRequestInterface;\n\nclass MyRequestFoundation implements RequestFoundationInterface\n{\n    public static function createFromGlobals(): ServerRequestInterface\n    {\n        // Implement your logic here to create and return a ServerRequestInterface instance from global variables\n    }\n}\n```\n\n## Contributing\n\nContributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository of this package.\n\n## License\n\nThis package is open-source and licensed under the [MIT License](https://opensource.org/licenses/MIT).\n\n## About Effectra\n\nEffectra is a leading technology company specializing in innovative solutions for [describe what Effectra does and its main areas of expertise].\n\nFor more information about Effectra, visit our website: [https://www.effectra.com](https://www.effectra.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffectra%2Fcontracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feffectra%2Fcontracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffectra%2Fcontracts/lists"}