{"id":27158902,"url":"https://github.com/activecollab/controller","last_synced_at":"2026-04-16T10:05:03.085Z","repository":{"id":56940277,"uuid":"58522732","full_name":"activecollab/controller","owner":"activecollab","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-23T14:29:09.000Z","size":257,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-03-28T00:58:30.674Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/activecollab.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-11T07:19:23.000Z","updated_at":"2022-12-27T00:07:46.000Z","dependencies_parsed_at":"2025-04-08T22:39:31.287Z","dependency_job_id":"09997675-e591-4361-b0d5-353428d06981","html_url":"https://github.com/activecollab/controller","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/activecollab/controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Fcontroller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Fcontroller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Fcontroller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Fcontroller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/activecollab","download_url":"https://codeload.github.com/activecollab/controller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activecollab%2Fcontroller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31880900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T09:23:21.276Z","status":"ssl_error","status_checked_at":"2026-04-16T09:23:15.028Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-04-08T22:39:26.372Z","updated_at":"2026-04-16T10:05:03.065Z","avatar_url":"https://github.com/activecollab.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Controller\n\n[![Build Status](https://travis-ci.org/activecollab/controller.svg?branch=v1.0)](https://travis-ci.org/activecollab/controller)\n\nSupported action responses:\n\n1. `\\ActiveCollab\\Controller\\Response\\FileDownloadResponse` - streams a file download.\n1. `\\ActiveCollab\\Controller\\Response\\StatusResponse` - returns a HTTP status, without response body.\n1. `\\ActiveCollab\\Controller\\Response\\ViewResponse` - Renders a particular view.\n\nWhen within a controller action, use these methods to get individual request parameters:\n\n1. `getParsedBodyParam()`\n2. `getCookieParam()`\n3. `getQueryParam()`\n4. `getServerParam()`\n\nAll of these methods accept three parameters:\n\n1. `$request` (`\\Psr\\Http\\Message\\ServerRequestInterface` instance)\n2. `$param_name` (string)\n3. `$default` (mixed, `NULL` by default)\n\n## Configuration\n\nControllers can override protected `configure()` method to do additional setup after controller construction. This method is separated from constructor, so developer does not need to inherit and manage complicated controller constructor.\n \n```php\n\u003c?php\n\nnamespace App;\n\nuse ActiveCollab\\Controller\\Controller;\n\nclass TestController extends Controller\n{\n    public $is_configured = false;\n\n    protected function configure(): void\n    {\n        $this-\u003eis_configured = true;\n    }\n}\n```\n\n## Exception Handling\n\nWhen action fails due to an exception, system will return 500 HTTP error, with a message that does not expose any of the system details. \n\nThis is done in such a way that new `RuntimeException` is constructed, with generic error message, and real exception is passed as `$previous` constructor argument of the new exception. If you have your system configured so exceptions are fully described when 500 errors are rendered (in debug mode for example), you'll be able to access original exception detials like that.\n\nTo change default exception message, call `setLogExceptionMessage()` controller method:\n\n```php\n$controller-\u003esetLogExceptionMessage('Something weird happened: {exception}');\n```\n\nIf `$logger` is added to the controller (during construction or later on), all exceptions that actions throw will be logged with error level.\n\n## To do\n\n1. Add `$payload` to status shortcut methods.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivecollab%2Fcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factivecollab%2Fcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivecollab%2Fcontroller/lists"}