public static function getNewId($reference = null, $base_id = null)
    {
        if (empty($reference)) {
            $reference = uniqid();
        }
        if (true===$base_id) {
            $base_id = $reference;
        }
        if (!is_null($base_id)) {
            $new_id = $base_id;
            while(in_array($new_id, self::$dom_id_register)) {
                $new_id = $base_id.'_'.uniqid();
            }
        } else {
            $new_id = uniqid();
            while(in_array($new_id, self::$dom_id_register)) {
                $new_id = uniqid();
            }
        }
        self::$dom_id_register[$reference] = $new_id;
        return $new_id;
    }