PHPackages                             silverorange/site - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. silverorange/site

Active[Utility &amp; Helpers](/categories/utility)

silverorange/site
=================

3018[5 issues](https://github.com/silverorange/site/issues)[2 PRs](https://github.com/silverorange/site/pulls)PHP

Pushed 1w ago15 watchersCompare

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

READMEChangelogDependenciesVersionsUsed By (0)

Site
====

[](#site)

Site is a Website framework built on top of [Swat](https://github.com/silverorange/swat). Site provides several features in one monolothic package:

- general application framework
- command line application framework
- web application framework
- web request routing
- image processing
- media processing
- account sign in and session management
- ad referral processing
- attachment uploading
- cdn management
- user commenting

SiteApplication
---------------

[](#siteapplication)

This represents an application. There are two main child classes:

- SiteWebApplication, and
- SiteCommandLineApplication

SiteApplicationModule
---------------------

[](#siteapplicationmodule)

Reusable features of applications (web or CLI) that should be available wherever there is application context are provided using a module interface.

Example provided modules are:

- database
- config
- memcache
- cd
- messages (cross-request session messages)

Modules declare their dependencies and are initialized using a tree sorting algorithm. For example, the `messages` module depends on the `session` module.

SitePage and SitePageDecorator
------------------------------

[](#sitepage-and-sitepagedecorator)

Pages represent route endpoints (URLs) in a web application. The URL path is often referred to as `$source`. Each page has several lifecycle hooks that can be overridden:

- `init()` - initialize objects that may be common to both the `process()` and build methods. Validating HTTP GET parameters can be done here.
- `process()` - runs between `init()` and `build()`. This method is indended to contain request logic that might prevent the page from being rendered. Handling HTTP POST parameters is done here.
- `build()` - use this method to render content and pass it to the page layout. If the page request does not cause a redirect, this method is used to build the response.
- `finalize()` - use this method to collect HTML head entries or perform any other post-build operations.

Decorators are composable objects that implement the page interface. They can enable horizontal reuse of features.

SiteLayout
----------

[](#sitelayout)

In a web application, each page has an associated layout. The page and layout are created and configured in `SiteWebApplication::getPage()`. One or more `SitePageFactory` objects may be used to select the correct page object and layout for a request.

The page sets properties on the layout's `$data` object. These properties can be used directly inside layout templates. Templates use pure immediate-mode PHP.

Like pages, layouts have request lifecycle hooks. These hooks run before the page hooks of the same name:

- `init()`
- `process()`
- `build()`
- `finalize()`
- `complete()` - this hook is only present in layouts and allows using data from the page's `finalize()` hook to build layout template values. It runs after the page's `finalize()` hook.

Additional Documentation
------------------------

[](#additional-documentation)

- [SiteEditPage Design](https://github.com/silverorange/site/wiki/SiteEditPage)
- [SiteImage Usage](https://github.com/silverorange/site/wiki/SiteImage)

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

[](#installation)

Make sure the silverorange composer repository is added to the `composer.json`for the project and then run:

```
composer require silverorange/site
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance44

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity8

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/166810?v=4)[Colin Viebrock](/maintainers/cviebrock)[@cviebrock](https://github.com/cviebrock)

---

Top Contributors

[![gauthierm](https://avatars.githubusercontent.com/u/120511?v=4)](https://github.com/gauthierm "gauthierm (1047 commits)")[![isagrant](https://avatars.githubusercontent.com/u/49716?v=4)](https://github.com/isagrant "isagrant (722 commits)")[![nburka](https://avatars.githubusercontent.com/u/1284966?v=4)](https://github.com/nburka "nburka (618 commits)")[![nrfredrickson](https://avatars.githubusercontent.com/u/4965439?v=4)](https://github.com/nrfredrickson "nrfredrickson (338 commits)")[![keithburgoyne](https://avatars.githubusercontent.com/u/299928?v=4)](https://github.com/keithburgoyne "keithburgoyne (327 commits)")[![charleswaddell](https://avatars.githubusercontent.com/u/1316827?v=4)](https://github.com/charleswaddell "charleswaddell (276 commits)")[![cviebrock](https://avatars.githubusercontent.com/u/166810?v=4)](https://github.com/cviebrock "cviebrock (74 commits)")[![Qcode](https://avatars.githubusercontent.com/u/1542145?v=4)](https://github.com/Qcode "Qcode (39 commits)")[![GervaisdeM](https://avatars.githubusercontent.com/u/963514?v=4)](https://github.com/GervaisdeM "GervaisdeM (20 commits)")[![wittman](https://avatars.githubusercontent.com/u/101092?v=4)](https://github.com/wittman "wittman (19 commits)")[![sgarrity](https://avatars.githubusercontent.com/u/58062?v=4)](https://github.com/sgarrity "sgarrity (17 commits)")[![kendraSO](https://avatars.githubusercontent.com/u/38441080?v=4)](https://github.com/kendraSO "kendraSO (8 commits)")[![pparke](https://avatars.githubusercontent.com/u/5822990?v=4)](https://github.com/pparke "pparke (7 commits)")[![m-mitchell](https://avatars.githubusercontent.com/u/169674?v=4)](https://github.com/m-mitchell "m-mitchell (7 commits)")[![marjmandi](https://avatars.githubusercontent.com/u/47076521?v=4)](https://github.com/marjmandi "marjmandi (2 commits)")[![wen-2018](https://avatars.githubusercontent.com/u/42974891?v=4)](https://github.com/wen-2018 "wen-2018 (2 commits)")[![jaymefSO](https://avatars.githubusercontent.com/u/32715263?v=4)](https://github.com/jaymefSO "jaymefSO (1 commits)")

### Embed Badge

![Health badge](/badges/silverorange-site/health.svg)

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

###  Alternatives

[laravel-enso/tables

Server-side data tables and export backend for Laravel Enso

63254.7k81](/packages/laravel-enso-tables)

PHPackages © 2026

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