PHPackages                             activecollab/controller - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. activecollab/controller

ActiveLibrary[Framework](/categories/framework)

activecollab/controller
=======================

Invokable controller that accepts containers, works with ETag and more

2.1.2(2y ago)115.4k—0%2MITPHPPHP &gt;=8.0CI failing

Since May 11Pushed 2y ago3 watchersCompare

[ Source](https://github.com/activecollab/controller)[ Packagist](https://packagist.org/packages/activecollab/controller)[ RSS](/packages/activecollab-controller/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (13)Versions (25)Used By (0)

Controller
==========

[](#controller)

[![Build Status](https://camo.githubusercontent.com/9083fe63e72bca9f1786366fe6e1cbae9ab9cc763cf99ed06d25093c982d0743/68747470733a2f2f7472617669732d63692e6f72672f616374697665636f6c6c61622f636f6e74726f6c6c65722e7376673f6272616e63683d76312e30)](https://travis-ci.org/activecollab/controller)

Supported action responses:

1. `\ActiveCollab\Controller\Response\FileDownloadResponse` - streams a file download.
2. `\ActiveCollab\Controller\Response\StatusResponse` - returns a HTTP status, without response body.
3. `\ActiveCollab\Controller\Response\ViewResponse` - Renders a particular view.

When within a controller action, use these methods to get individual request parameters:

1. `getParsedBodyParam()`
2. `getCookieParam()`
3. `getQueryParam()`
4. `getServerParam()`

All of these methods accept three parameters:

1. `$request` (`\Psr\Http\Message\ServerRequestInterface` instance)
2. `$param_name` (string)
3. `$default` (mixed, `NULL` by default)

Configuration
-------------

[](#configuration)

Controllers 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.

```
