PHPackages                             ngames/framework - 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. ngames/framework

ActiveLibrary[Framework](/categories/framework)

ngames/framework
================

The NGames Framework is a simple PHP framework developped for the websites https://www.worldwar.fr and https://www.guide-tnt.fr

0.8.0(2mo ago)01.0k↓86.7%1MITPHPPHP &gt;= 8.5CI passing

Since May 4Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/ngamesfr/ngames-framework)[ Packagist](https://packagist.org/packages/ngames/framework)[ RSS](/packages/ngames-framework/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (4)Versions (14)Used By (0)

NGames Framework - A simple PHP framework
=========================================

[](#ngames-framework---a-simple-php-framework)

[![Build Status](https://camo.githubusercontent.com/e579572854f9060c34d658d9e231f1923e5f310019aed01e298a2322900726c1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6e67616d657366722f6e67616d65732d6672616d65776f726b2f6275696c642d746573742e796d6c)](https://github.com/ngamesfr/ngames-framework/actions?query=workflow%3A%22Build+and+test%22)[![License](https://camo.githubusercontent.com/ff4feb4f1e24409a78f8dd0fa9a2aa06b7fe509986d1f3a8483fa2fb8c6e4db7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e67616d657366722f6e67616d65732d6672616d65776f726b)](https://packagist.org/packages/ngames/framework)[![Last release](https://camo.githubusercontent.com/8d446c07df766cebbba64c542f50f0cfb56eb7d6ef5894fb29b9f0695ae4afe0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6e67616d657366722f6e67616d65732d6672616d65776f726b)](https://packagist.org/packages/ngames/framework)

[![Coverage](https://camo.githubusercontent.com/9e1f26106dc5fd81c0fb51cd90e59177c33fe9bd529d74c803566d8561e9eada/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6e67616d657366725f6e67616d65732d6672616d65776f726b266d65747269633d636f766572616765)](https://sonarcloud.io/dashboard?id=ngamesfr_ngames-framework)

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

[](#installation)

Use composer to install the application: `composer require ngames/framework`. Or you can update the `composer.json` file by adding the following line in the `require` object:

```
{
    "require": {
        "ngames/framework": "~0.3"
    }
}
```

Usage
-----

[](#usage)

### Configuration file

[](#configuration-file)

You need to write a configuration file using [INI](https://en.wikipedia.org/wiki/INI_file) format. Typically, this file is called `config.ini` and is located in the `config` folder at the root of the project. Here is an example with all supported configuration keys:

```
# Database configuration
database.host       = "127.0.0.1"
database.username   = "db_user"
database.password   = "db_password"
database.name       = "db_name"

# Log configuration (destination must be a file), the level is the minimum level for logging messages
log.destination     = "./logs/application.log"
log.level           = "debug"

# Whether the debug mode is enabled or not (default is false)
debug               = "true"
```

### Application initialization

[](#application-initialization)

In a `public` folder in the root of the project, create a file named `index.php` with the following content:

```
