2.4.3 2018-02-07 15:52 UTC


Latest Stable Version Total Downloads


Trieur is a php library to sort, filter data with differents

The main classes is a Dependency Injection Container (it extends the famous Pimple). It instanciates a driver class, a source class and a columns configuration class. Each source and driver class each extend an abstract containing basic methods to communicate through the main class.

It was originally build to print data in ower backend solution to display data, and to export them. We use dataTables jquery pluggin. Therefore one of the driver available is made for this javascript pluggin.


use Solire\Trieur\Trieur;
use Solire\Conf\Conf;
use Doctrine\DBAL\DriverManager;

// Defining the trieur configuration
$trieurConf = new Conf;
    ->set('csv', 'driver', 'name')
    ->set('doctrine', 'source', 'name')

// Defining a source, here we use a doctrine connection
$parameters = [
    'driver' => 'pdo_mysql',
$doctrineConnection = DriverManager::getConnection($parameters);

// Then here goes the magic
$trieur = new Trieur($conf, $doctrineConnection);

$response = $trieur->getResponse();

header('Content-type: application/json');
echo json_encode($response);