PHPackages                             monkeycode/staticpageprovider - 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. monkeycode/staticpageprovider

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

monkeycode/staticpageprovider
=============================

v1.0(12y ago)11411MITPHP

Since Feb 20Pushed 12y ago1 watchersCompare

[ Source](https://github.com/meandmymonkey/silex-staticprovider)[ Packagist](https://packagist.org/packages/monkeycode/staticpageprovider)[ RSS](/packages/monkeycode-staticpageprovider/feed)WikiDiscussions master Synced 3d ago

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

StaticPageControllerProvider for Silex
======================================

[](#staticpagecontrollerprovider-for-silex)

A Silex ControllerProvider that helps reducing boilerplate code for static page configuration when building small sites with Silex and Twig.

[![Build Status](https://camo.githubusercontent.com/b8f478e6652628633bee8785e7536b83eb5f2a5e9a695af501ecead65b66af38/68747470733a2f2f7472617669732d63692e6f72672f6d65616e646d796d6f6e6b65792f73696c65782d73746174696370726f76696465722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/meandmymonkey/silex-staticprovider)

Usage
-----

[](#usage)

```
$controllers = new StaticPageControllerProvider(
    [
        'home'     => ['path' => '/',           'template' => 'index.html.twig'],
        'about'    => ['path' => '/about',      'template' => 'team.html.twig'],
        'services' => ['path' => '/services',   'template' => 'services.html.twig'],
        'contact'  => ['path' => '/getintouch', 'template' => 'contact.html.twig']
    ]
);
```

Cache Headers
-------------

[](#cache-headers)

The options accepted by Symfony's `Response::setCache()` method can be configured as a second argument, and will be used for all registered pages:

```
$controllers = new StaticPageControllerProvider(
    [
        'home' => ['path' => '/', 'template' => 'index.html.twig']
    ],
    ['s_maxage' => 3600]
);
```

Content Type
------------

[](#content-type)

An optional `type` parameter can be used to set the response content type:

```
$controllers = new StaticPageControllerProvider([
    'descr' => [
        'path' => '/descr',
        'template' => 'descr.xml.twig',
        'type' => 'text/xml',
    ]
]);
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

4466d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d8c79bfc0e8f4ba10b22fbcdb6e1dd859961754d8b42fb2a027a8bafe7169a7?d=identicon)[meandmymonkey](/maintainers/meandmymonkey)

---

Tags

twigsilexcontrollerprovider

###  Code Quality

TestsBehat

### Embed Badge

![Health badge](/badges/monkeycode-staticpageprovider/health.svg)

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

###  Alternatives

[twig/extra-bundle

A Symfony bundle for extra Twig extensions

91292.0M315](/packages/twig-extra-bundle)[twig/intl-extra

A Twig extension for Intl

36663.2M221](/packages/twig-intl-extra)[twig/string-extra

A Twig extension for Symfony String

21946.0M133](/packages/twig-string-extra)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

23018.5M55](/packages/twig-cssinliner-extra)[symfony/ux-twig-component

Twig components for Symfony

21814.8M162](/packages/symfony-ux-twig-component)[twig/markdown-extra

A Twig extension for Markdown

12114.3M83](/packages/twig-markdown-extra)

PHPackages © 2026

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