PHPackages                             oscarotero/fol - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. oscarotero/fol

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

oscarotero/fol
==============

Base App class to build websites

v1.0.1(4y ago)31.0k↓100%1MITPHPPHP ^7.2|^8.0

Since Jan 8Pushed 4y ago2 watchersCompare

[ Source](https://github.com/oscarotero/fol)[ Packagist](https://packagist.org/packages/oscarotero/fol)[ Docs](https://github.com/fol-project/core)[ RSS](/packages/oscarotero-fol/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (6)Dependencies (6)Versions (7)Used By (1)

Fol
===

[](#fol)

[![Latest Version on Packagist](https://camo.githubusercontent.com/30e114f38d779d0a3c87f05a507bdec733b1454fdec5e20449320f66e9ba7d76/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f736361726f7465726f2f666f6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oscarotero/fol)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/88b493f3a855c0536c55859c06eb57ea05485dd964ef068ab1c52389f8af7c62/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6f736361726f7465726f2f666f6c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/oscarotero/fol)[![Quality Score](https://camo.githubusercontent.com/d47e935af237817a974f2bb585c329b040f00d78bbe8a5cd64e19f02466e1a0f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6f736361726f7465726f2f666f6c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/oscarotero/fol)

This is a simple class with some utils to build websites with the following features:

Paths and URI
-------------

[](#paths-and-uri)

Manage the path of the app and the public uri using the `UriInterface` from [PSR-7](http://www.php-fig.org/psr/psr-7/):

```
use Fol\App;
use Zend\Diactoros\Uri;

$path = '/var/www/my-website';
$uri = new Uri('http://localhost/my-website');

$app = new App($path, $uri);

//Get the path
$app->getPath(); // /var/www/my-website
$app->getPath('dir/subdir', '../other'); // /var/www/my-website/dir/other

//Get the uri
(string) $app->getUri(); // http://localhost/my-website
(string) $app->getUri('post/1', 'details'); // http://localhost/my-website/post/1/details
```

PSR-11
------

[](#psr-11)

It's compatible with [PSR-11](https://github.com/php-fig/container) and [container-interop/service-provider](https://github.com/container-interop/service-provider), and allows to nest other containers:

```
use Fol\App;
use Zend\Diactoros\Uri;

$app = new App(__DIR__, new Uri('http://localhost/my-website'));

//Set a value
$app->set('database.config', [
    'user' => 'foo',
    'pass' => 'bar'
]);

//Get the value
$config = $app->get('database.config');

//Set a service
$app->addService('database', function ($app) {
    return new DatabaseClass($app->get('database.config'));
});

//Get the service value
$database = $app->get('database');

//And add ServiceProviderInterface instances to register several dependencies
$app->addServiceProvider(new MyServiceProvider());
```

---

Please see [CHANGELOG](CHANGELOG.md) for more information about recent changes.

The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity72

Established project with proven stability

 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

Every ~360 days

Recently: every ~438 days

Total

6

Last Release

1608d ago

Major Versions

v0.3.0 → v1.0.02019-04-03

PHP version history (3 changes)v0.1.0PHP ^7.0

v1.0.0PHP ^7.2

v1.0.1PHP ^7.2|^8.0

### Community

Maintainers

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

---

Top Contributors

[![oscarotero](https://avatars.githubusercontent.com/u/377873?v=4)](https://github.com/oscarotero "oscarotero (17 commits)")

---

Tags

appcontainer-interoppsr-7service-providerPSR-11app

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/oscarotero-fol/health.svg)

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

###  Alternatives

[php-di/php-di

The dependency injection container for humans

2.8k48.9M994](/packages/php-di-php-di)[laminas/laminas-servicemanager

Factory-Driven Dependency Injection Container

15955.1M694](/packages/laminas-laminas-servicemanager)

PHPackages © 2026

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