PHPackages                             fol/core - 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. [Framework](/categories/framework)
4. /
5. fol/core

Abandoned → [oscarotero/fol](/?search=oscarotero%2Ffol)ArchivedLibrary[Framework](/categories/framework)

fol/core
========

The core of FOL framework

v11.1.0(10y ago)01.7k2AGPL-3.0PHPPHP &gt;=5.5.0

Since Oct 26Pushed 10y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (1)Versions (81)Used By (2)

fol-core
========

[](#fol-core)

[![Build Status](https://camo.githubusercontent.com/5645f5298c130ddd18e5ee4860c8a9df4e11dd5fc4bb32d3b9257e73f2b7872e/68747470733a2f2f7472617669732d63692e6f72672f666f6c2d70726f6a6563742f636f72652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fol-project/core)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3ac5d55cb1be9158a6207ee18d2eab2834c60a0dc015b663cb806d0e39575ad4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f666f6c2d70726f6a6563742f636f72652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/fol-project/core/?branch=master)

Trátase dunha simple clase que serve de contenedor da nosa app. Contén as seguintes funcionalidades:

Container-interop
-----------------

[](#container-interop)

Compatible coa interface [container-interop](https://github.com/container-interop/container-interop), o que permite interactuar con outros contedores. Podes especificar dependencias ou engadir outros contenedores:

```
$app = new Fol();

//Definir dependencias:
$app->set('database', function () {
    return new MyDatabaseClass($config);
});

//Engadir outros conenedores compatibles con Container-Interop
$app->add($container);

//Engadir un ServiceProviderInterface
$app->register(new MyServiceProvider());

//Obter as dependencias
$database = $app->get('database');

//Tamén podes usar a interface de array para engadir/obter dependencias:
$database = $app['database'];

$app['templates'] = function () {
    return new TemplatesEngine();
};
```

Path
----

[](#path)

A parte de servir de container, tamén serve para definir o path da nosa aplicación. O path é simplemente a ruta absoluta ao directorio da aplicación:

```
$app = new Fol();

//Dame a ruta
$app->getPath(); // /var/www/sitioweb/app

//Dame a ruta xuntándolle estas pezas:
$app->getPath('dir/subdir', '../outro'); // /var/www/sitioweb/dir/outro

//O path calculase automaticamente (o directorio onde se atopa a clase instanciada) pero podes cambialo:
$path->setPath(__DIR__); //Nunca pode rematar en "/"
```

Url
---

[](#url)

Outra función é gardar a url pública dende a que se accede á nosa app, útil para xerar links, por exemplo:

```
$app = new Fol();

//Define unha url
$app->setUrl('http://localhost/o-meu-sitio');

//Dame a url
$app->getUrl(); // http://localhost/o-meu-sitio

//Dame só o path
$app->getUrlPath(); // /o-meu-sitio

//Dame só o host
$app->getUrlHost(); // http://localhost

//Tamén podes engadirlle pezas:
$app->getUrl('post/1', 'ver'); // http://localhost/o-meu-sitio/post/1/ver

$app->getUrlPath('post/1', 'ver'); // /o-meu-sitio/post/1/ver
```

Namespace
---------

[](#namespace)

Por último, temos unha utilidade para devolver o namespace da app. Útil para instanciar clases relativas.

```
namespace App;

use Fol;

class App extends Fol {

}

$app = new App();

//Dame o namespace
$app->getNamespace(); // App

//Tamén podes engadirlle pezas
$app->getNamespace('Controllers\\Base'); // App\\Controllers\\Base;
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 99.5% 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 ~10 days

Recently: every ~18 days

Total

79

Last Release

3788d ago

Major Versions

v6.0 → v7.02015-03-11

v7.2 → v8.0.02015-06-25

v8.2.0 → v9.0.02015-10-14

v9.0.2 → v10.0.02015-10-31

v10.0.1 → v11.0.02015-12-30

PHP version history (2 changes)v0.2.4PHP &gt;=5.4.0

v9.0.0PHP &gt;=5.5.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 (210 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

framework

### Embed Badge

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

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

###  Alternatives

[pestphp/pest-plugin-stressless

Stressless plugin for Pest

67792.6k16](/packages/pestphp-pest-plugin-stressless)[mouf/mouf

The Mouf PHP framework: an open-source PHP framework providing an easy way to download, install, use and reuse components, with a graphical user interface.

55146.0k17](/packages/mouf-mouf)

PHPackages © 2026

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