<?php
class EnigmeFactory{
    public static function create($results)
    {
        $tabEnigme=array();
        foreach($results as $row)
        {
            $tabEnigme[]= new Enigme($row['id'],$row['admin'],$row['enonce'],$row['aide'],$row['rappel'],$row['solution'],$row['test'],$row['tempsDeResolution'],$row['points']);
        }
        return $tabEnigme;
    }
}