PHPackages                             4apps/staticphp-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. 4apps/staticphp-core

ActiveLibrary

4apps/staticphp-core
====================

A lightweight PHP framework

v2.0.329(today)020↑2600%MITPHPPHP &gt;=8.4 &lt;9CI passing

Since Aug 1Pushed todayCompare

[ Source](https://github.com/gintsmurans/staticphp-core)[ Packagist](https://packagist.org/packages/4apps/staticphp-core)[ RSS](/packages/4apps-staticphp-core/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (3)Used By (0)

[![packagist](https://camo.githubusercontent.com/5da3f05f3a691a10443cb88355f523c69be7aaa1b8ccde5fd6080bc9515ebdfb/687474703a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d34617070732532467374617469637068702d2d636f72652d627269676874677265656e2e737667)](https://packagist.org/packages/4apps/staticphp-core)

StaticPHP Core
==============

[](#staticphp-core)

The StaticPHP framework, as a library.

Full documentation:

This is the package an application depends on. The application skeleton - the demo app, the asset pipeline, the dev container, the `staticphp` cli - lives in [gintsmurans/staticphp](https://github.com/gintsmurans/staticphp) and is what `composer create-project` gives you.

```
composer require 4apps/staticphp-core
```

Requirements
------------

[](#requirements)

- PHP 8.4+
- ext-intl, ext-mbstring, ext-pdo
- Twig 3.0+ (optional, see below)

Layout
------

[](#layout)

Everything is under the `StaticPHP\` namespace, resolved by PSR-4:

```
src/Core/            Config, Load, Request, Router, Logger, error pages, bootstrap
src/Presentation/    Tables, menus, html helpers
src/Utils/           Db, Cache, Sessions, i18n, migrations, Csrf, Fv, dates

```

Applications keep their own conventions: a module name is its own namespace root (`Pasta\Controllers\Quality`), resolved at runtime against whichever application served the request. That is deliberately not PSR-4 - one repository can serve several applications, each with its own `Modules` directory, and composer's map is static and global.

Getting it running
------------------

[](#getting-it-running)

A front controller declares where its application is; everything else derives from that.

```
