protected function getControllers(string $controllersPath) : array
    {
        $controllers = [];

        // List all controller files inside the ..src/controller folder
        if (is_dir($controllersPath)) {
            foreach (scandir($controllersPath) as $controller) {
                // Skip directory pointers
                if ($controller == '.' || $controller == '..' || is_dir($controllersPath . '/' . $controller)) {
                    continue;
                }

                // Check if file's extension is ".php"
                $filePath   = $controllersPath . '/' . $controller;
                $fileExt    = pathinfo($filePath)['extension'];
                if ($fileExt == 'php' && is_file($filePath)) {
                    $controllers[] = $controller;
                }
            }
        }

        return $controllers;
    }