PHPackages                             switon/view - 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. switon/view

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

switon/view
===========

View composition and rendering support for Switon Framework

v1.0.0(1mo ago)011MITPHPPHP &gt;=8.3CI passing

Since May 10Pushed 1mo agoCompare

[ Source](https://github.com/switon-php/view)[ Packagist](https://packagist.org/packages/switon/view)[ Docs](https://github.com/switon-php/view)[ RSS](/packages/switon-view/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (5)Versions (2)Used By (1)

Switon View Package
===================

[](#switon-view-package)

View composition and rendering support for Switon Framework.

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

[](#installation)

```
composer require switon/view
```

**Requirements:** PHP 8.3+

Quick Start
-----------

[](#quick-start)

```
use Switon\Core\Attribute\Autowired;
use Switon\Viewing\ViewInterface;

class UserController
{
    #[Autowired] protected ViewInterface $view;

    public function profileAction(): string
    {
        return $this->view
            ->setLayout('@view/Layouts/Default')
            ->setVars(['title' => 'Profile', 'user' => ['name' => 'Mark']])
            ->render('@view/User/Profile');
    }
}
```

Docs:

License
-------

[](#license)

MIT.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance94

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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

31d ago

### Community

Maintainers

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

---

Top Contributors

[![switon-php](https://avatars.githubusercontent.com/u/247358032?v=4)](https://github.com/switon-php "switon-php (5 commits)")

---

Tags

renderingswitontemplatesviewviewtemplatesRenderingswiton

### Embed Badge

![Health badge](/badges/switon-view/health.svg)

```
[![Health](https://phpackages.com/badges/switon-view/health.svg)](https://phpackages.com/packages/switon-view)
```

###  Alternatives

[laminas/laminas-view

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

7527.7M258](/packages/laminas-laminas-view)[shoot/shoot

Shoot aims to make providing data to your templates more manageable

40229.9k2](/packages/shoot-shoot)[view-components/view-components

Flexible Framework-Agnostic UI for Enterprise Web Applications

24107.0k7](/packages/view-components-view-components)[san-kumar/laravel-crud

Laravel CRUD generator: Generate CRUD for any db table with the crud:generate command.

564.6k](/packages/san-kumar-laravel-crud)

PHPackages © 2026

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