PHPackages                             markorstc/laminas-typedview - 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. [Templating &amp; Views](/categories/templating)
4. /
5. markorstc/laminas-typedview

ActiveLibrary[Templating &amp; Views](/categories/templating)

markorstc/laminas-typedview
===========================

Strongly typed view layer, as extension for Laminas MVC system, focused on easy code navigation and type hinting

1.0.0(4y ago)07BSD-3-ClausePHPPHP ^8.0

Since Jul 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/markorstc/laminas-typedview)[ Packagist](https://packagist.org/packages/markorstc/laminas-typedview)[ RSS](/packages/markorstc-laminas-typedview/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Typed View Layer for Laminas
============================

[](#typed-view-layer-for-laminas)

#### Key features

[](#key-features)

- strongly typed view layer
- clean template scope
- easy code navigation
- type hinting

Installation
------------

[](#installation)

#### Install module via Composer

[](#install-module-via-composer)

```
$ composer require markorstc/laminas-typedview

```

#### Requirements

[](#requirements)

PHP 8 or above

#### Enable module via config

[](#enable-module-via-config)

    Enable.module.mp4    Getting started
---------------

[](#getting-started)

#### Create view model and template

[](#create-view-model-and-template)

You create a typed view model by extending abstract class `TypedView\Entity\ViewModel`. Then you specify path to your `.phtml` template file in `TypedView\Entity\ViewModel::getTemplate()` method.

    Create.view.model.mp4    #### Use model in controller

[](#use-model-in-controller)

To render your model, simply return it in Laminas controller action as you do it with standard `Laminas\View\Model\ViewModel`.

    Use.model.in.controller.mp4    If you want to use common layout for multiple controllers or actions, you have to implement `TypedView\Controller\LayoutModelAware` interface in your controller.

At the same time, you specify callback, that will set rendered child model to the parent model (in this case rendered `MyListViewModel` to parent `MyLayoutModel`).

    Use.root.layout.model.mp4    #### Use Laminas view helpers

[](#use-laminas-view-helpers)

It's possible to use Laminas standard view helpers, but you have to extend `TypedView\Entity\LaminasBridgeModel` when creating your typed view model.

If you want to use single particular Laminas view helper and keep clean scope in your template, you can use helper traits e.g. `TypedView\Helper\UrlViewHelper`.

    Laminas.view.helpers.mp4    #### Nesting view models

[](#nesting-view-models)

It's possible to use view models as individual components and combine them.

To add one model to another use `TypedView\Entity\ViewModel::addChild()` method and specify capture callback the same way like in the layout model example.

    View.models.nesting.mp4

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1763d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c94f81ae6b8e812b639bac11477d9d231b807a24c6e3d9c7c90e3f741ea4ed03?d=identicon)[markorstc](/maintainers/markorstc)

---

Top Contributors

[![markorstc](https://avatars.githubusercontent.com/u/12954262?v=4)](https://github.com/markorstc "markorstc (7 commits)")

---

Tags

laminasviewtyped

### Embed Badge

![Health badge](/badges/markorstc-laminas-typedview/health.svg)

```
[![Health](https://phpackages.com/badges/markorstc-laminas-typedview/health.svg)](https://phpackages.com/packages/markorstc-laminas-typedview)
```

###  Alternatives

[laminas/laminas-view

Fast and type safe HTML templating library with a flexible plugin system supporting multistep template composition

7526.3M229](/packages/laminas-laminas-view)[eftec/bladeone

The standalone version Blade Template Engine from Laravel in a single php file

8208.4M87](/packages/eftec-bladeone)[laracasts/presenter

Simple view presenters

8643.4M46](/packages/laracasts-presenter)[kokspflanze/zfc-twig

Laminas/Zend Framework Module that provides a Twig rendering strategy and extensions to render actions or trigger events from your templates

15299.3k4](/packages/kokspflanze-zfc-twig)[tasmaniski/laminas-current-route

View Helper for reading current route info: Controller, Action, Module name

3612.2k](/packages/tasmaniski-laminas-current-route)[tasmaniski/zf2-current-route

View Helper for reading current route info: Controller, Action, Module name

366.9k](/packages/tasmaniski-zf2-current-route)

PHPackages © 2026

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