<?php

namespace Digtective\Base;

use Digtective\Controllers\ConnectionController;
use Digtective\Controllers\FormSubmissionController;
use Digtective\Controllers\SessionController;

class Route{
    const BASE_PATH = 'digtective/v1';

    public function getControllers(){
        return [
            ConnectionController::class,
            FormSubmissionController::class,
            SessionController::class,
        ];
    }

    public function register(){
        foreach(self::getControllers() as $class){
            $service = new $class();
            if(method_exists($service, 'register')){
                $service->register();
            }
        }
    }
}
