PHPackages                             sebaks/zend-mvc-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. sebaks/zend-mvc-controller

ActiveLibrary[Framework](/categories/framework)

sebaks/zend-mvc-controller
==========================

0.1.9(9y ago)01.3k21PHPPHP &gt;=5.5

Since Feb 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/sebaks/zend-mvc-controller)[ Packagist](https://packagist.org/packages/sebaks/zend-mvc-controller)[ RSS](/packages/sebaks-zend-mvc-controller/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (13)Used By (1)

[![Build Status](https://camo.githubusercontent.com/4a01b3f0be3eaa76966c70c004a9c7a161e8331407c25e741f89ffac51b0dab6/68747470733a2f2f7472617669732d63692e6f72672f736562616b732f7a656e642d6d76632d636f6e74726f6c6c65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sebaks/zend-mvc-controller)[![codecov.io](https://camo.githubusercontent.com/d0086796f106c9e028a6bca4b87bd1b08ad578b613efed07c1aadf8cdc3d5149/687474703a2f2f636f6465636f762e696f2f6769746875622f736562616b732f7a656e642d6d76632d636f6e74726f6c6c65722f636f7665726167652e7376673f6272616e63683d6d6173746572)](http://codecov.io/github/sebaks/zend-mvc-controller?branch=master)

Zend MVC controller implementation
==================================

[](#zend-mvc-controller-implementation)

This is controller implementation for Zend MVC builds on [sebaks/controller](https://github.com/sebaks/controller).

Most controllers must do

1. Check if that controller\\action can be accessed by called method (GET, POST, PUT etc.), if not - rise exception.
2. Process request (this is responsibility of [sebaks/controller](https://github.com/sebaks/controller)).
3. Validate request criteria.
4. Validate request data.
5. Process request (run any domain service).
6. Collect errors.
7. Collect result.
8. Rise exceptions if error exists.
9. Redirect to next page (if define).
10. Setup ViewModel.
11. Setup MVC Event.

That solution allow to customize any flow parameter and increases code reuse.

Installation
============

[](#installation)

1. Install it via composer by running:

    ```
    composer require sebaks/zend-mvc-controller
    ```
2. Copy `./vendor/sebaks/zend-mvc-controller/config/sebaks-zend-mvc-controller.global.php.dist` to `./config/autoload/sebaks-zend-mvc-controller.global.php`.

Configuration
=============

[](#configuration)

You can configure that controller with route params:

```
'router' => [
    'routes' => [
        'user-update-profile' => [
            'type' => 'Segment',
            'options' => [
                'route'    => '/profile/update',
                'defaults' => [
                    'controller' => 'sebaks-zend-mvc-controller',
                    'allowedMethods' => ['POST'],
                    'criteriaValidator' => Users\Action\Profile\CriteriaValidator::class,
                    'changesValidator' => Users\Action\Profile\ChangesValidator::class,
                    'service' => Users\Action\Profile\Updater::class,
                    'request' => Sebaks\Controller\RequestInterface::class,
                    'routeCriteria' => 'id'
                    'response' => Sebaks\Controller\ResponseInterface::class,
                    'redirectTo' => 'admin-user-list',
                    'viewModel' => Users\User\ViewModel::class,
                ],
            ],
        ],
    ],
],
```

`criteriaValidator`, `changesValidator` - if not defined, will be created `Sebaks\Controller\EmptyValidator`
`service` - if not defined, will be created `Sebaks\Controller\EmptyService`
`request` - if not defined, will be created `Sebaks\Controller\Request`
`response` - if not defined, will be created `Sebaks\Controller\Response`
`viewModel` - if not defined, will be created `Zend\View\Model\ViewModel`

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~35 days

Recently: every ~83 days

Total

12

Last Release

3335d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6eced3c54438bdccdc48759c7abfbbc56e1244d4f81d78bdb4bd185aeb417a96?d=identicon)[sebaks](/maintainers/sebaks)

---

Top Contributors

[![sebaks](https://avatars.githubusercontent.com/u/9897880?v=4)](https://github.com/sebaks "sebaks (31 commits)")[![maxgu](https://avatars.githubusercontent.com/u/208688?v=4)](https://github.com/maxgu "maxgu (22 commits)")[![shirokikhyura](https://avatars.githubusercontent.com/u/30996494?v=4)](https://github.com/shirokikhyura "shirokikhyura (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/sebaks-zend-mvc-controller/health.svg)

```
[![Health](https://phpackages.com/badges/sebaks-zend-mvc-controller/health.svg)](https://phpackages.com/packages/sebaks-zend-mvc-controller)
```

###  Alternatives

[zucchi/zucchi

Zucchi Component Library for Zend Framework 2

121.5k1](/packages/zucchi-zucchi)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
