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

ActiveLibrary[Framework](/categories/framework)

soneritics/framework
====================

Soneritics PHP framework for PHP 5.5 and higher.

2.2.2(6y ago)0140[1 issues](https://github.com/Soneritics/Framework/issues)MITPHPPHP &gt;=5.5.0

Since Apr 12Pushed 4y ago2 watchersCompare

[ Source](https://github.com/Soneritics/Framework)[ Packagist](https://packagist.org/packages/soneritics/framework)[ Docs](http://framework.soneritics.nl/)[ RSS](/packages/soneritics-framework/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (9)Versions (17)Used By (0)

Soneritics Framework
====================

[](#soneritics-framework)

[![Build Status](https://camo.githubusercontent.com/535a21cb24cfd8d746e916f7aa82ef7617ad02b0f94216a1a9eadd557c44f2cc/68747470733a2f2f6170692e7472617669732d63692e6f72672f536f6e657269746963732f4672616d65776f726b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Soneritics/Framework)[![Coverage Status](https://camo.githubusercontent.com/1ea613da1613fd1241546f6e48c89fa75171974efde4b71b7438ef19d4ae8307/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f536f6e657269746963732f4672616d65776f726b2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/Soneritics/Framework?branch=master)[![License](https://camo.githubusercontent.com/505fe3a551fc6e64816f64cee81471b04e7ef943170e4f994c249982b3fd4290/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](https://camo.githubusercontent.com/505fe3a551fc6e64816f64cee81471b04e7ef943170e4f994c249982b3fd4290/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)

by

- [@Soneritics](https://github.com/Soneritics) - Jordi Jolink

Introduction
------------

[](#introduction)

A brief summarization of what this framework does:

> The Soneritics framework is a framework that is object oriented and provides some useful functionalities for creating websites and web applications very easy.

Minimum Requirements
--------------------

[](#minimum-requirements)

- PHP 5.5+
- PDO driver for your respective database (atm only MySQL is supported)

Supported Databases
-------------------

[](#supported-databases)

- MySQL

Features
--------

[](#features)

- MVC structure
- Routing
- Database finder
- REST
- And more

### Installation

[](#installation)

Setup is very easy and straight-forward. You can choose on of the following options:

1. Upload the framework to your include path.
2. Upload the framework to a private directory, on level higher than your website/web app's folder.

Then start the framework by including the bootstrap:

```
require_once('Framework/Bootstrap.php');
new Framework\Bootstrap;
```

### Database querying

[](#database-querying)

Database querying is very easy. A few examples can be found in the code below.

```
// Define the tables we have as Table extends
class Father extends Table {}
class Mother extends Table {}
class Child extends Table {}

// Use the Child table as a base for the queries
$child = new Child;

// Select everything from the children table
$child
    ->select()
    ->execute();

// Join a child with it's parents
$child
    ->select()
    ->leftJoin(new Father, 'Father.id = father_id')
    ->leftJoin(new Mother, 'Mother.id = mother_id')
    ->execute();

// A new child has been born!
$child
    ->insert()
    ->values([
        'firstname' => 'first name',
        'lastname' => 'last name',
        'father_id' => 1,
        'mother_id' => 1
    ])
    ->execute();

// Typo in the baby's name :-)
$child
    ->update()
    ->set('firstname', 'new first name')
    ->where([
        'firstname' => 'first name',
        'lastname' => 'last name'
    ])
    ->execute();

// Typo in the first and lastname of the baby :O
$child
    ->update()
    ->set(['firstname' => 'new first name', 'lastname' => 'new last name'])
    ->where([
        'firstname' => 'first name',
        'lastname' => 'last name'
    ])
    ->execute();

// Selecting with some sorting and limiting
$child
    ->select()
    ->leftJoin(new Father, 'Father.id = father_id')
    ->leftJoin(new Mother, 'Mother.id = mother_id')
    ->orderAsc('lastname')
    ->orderAsc('firstname')
    ->limit(25)
    ->execute();
```

### User input

[](#user-input)

Handling input from a user can be done using the FormHelper. In your views, the FormHelper is accessible through the $form property.

The following example shows how a user can be added to the database.

**View file**

```
    // Render the form's start tag
    $this->form
        ->start()
        ->setMethod('post')
        ->setAction('/add-user')
        ->setParam('id', 'loginForm')
        ->setClass('form-horizontal')
        ->render();

    /* Render the inputs for the user's email and name.
     * When the user submits a form that is invalid, the
     * object automatically assigns an error class.
     * By using the setValueFromPost() function, the
     * previously entered value gets set.
     */
    $this->form
        ->text('User.email')
        ->setParam('id', 'email')
        ->setParam('placeholder', 'Email address here')
        ->setClass('form-control')
        ->setValueFromPost()
        ->render();

    $this->form
        ->text('User.name')
        ->setParam('placeholder', 'Your name')
        ->setClass('form-control')
        ->setValueFromPost()
        ->render();

    $this->form->submit()->render();

    // Form's end tag
    $this->form->end()->render();
```

**Controller**

```
class User extends Controller
{
    public function addAction()
    {
        return new View('User/add');
    }

    public function addPost()
    {
        // Create the model, based on the Table object
        $userModel = new Models\User;

        // Validate data
        if (!$userModel->validates($this->fromPost('User'))) {
            return $this->addAction();
        }

        // Insert data and get the last insert id
        $userId = $userModel
            ->insert()
            ->set($this->fromPost('User'))
            ->execute();

        /* The user is now added to the database.
         * The following code can fetch the user data:
         * $userData = $userModel->select()->where(['id' => $userId])->execute()->get();
         *
         * This will return the following array:
         * [
         *     'User' => [
         *         'id' => 1,
         *         'email' => 'User email address',
         *         'name' => 'User name'
         *     ]
         * ]
         */

        // Done, redirect to the homepage
        new Redirect('/');
    }
}
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

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 ~125 days

Recently: every ~178 days

Total

14

Last Release

2428d ago

Major Versions

1.1.5 → 2.0.02016-06-02

1.2.0 → 2.1.02017-10-10

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3717850?v=4)[Jordi Jolink](/maintainers/soneritics)[@Soneritics](https://github.com/Soneritics)

---

Top Contributors

[![Soneritics](https://avatars.githubusercontent.com/u/3717850?v=4)](https://github.com/Soneritics "Soneritics (212 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/soneritics-framework/health.svg)

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

###  Alternatives

[magento/community-edition

Magento 2 (Open Source)

12.1k52.1k10](/packages/magento-community-edition)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[elgg/elgg

Elgg is an award-winning social networking engine, delivering the building blocks that enable businesses, schools, universities and associations to create their own fully-featured social networks and applications.

1.7k15.7k5](/packages/elgg-elgg)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[mako/framework

Mako Framework

249170.3k23](/packages/mako-framework)

PHPackages © 2026

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