<?php
use ProVM\KI\Common\Controller\Web\Base;

$folder = implode(DIRECTORY_SEPARATOR, [
  __DIR__,
  'web'
]);
if (file_exists($folder)) {
  $files = new DirectoryIterator($folder);
  foreach ($files as $file) {
    if ($file->isDir()) {
      continue;
    }
    include_once $file->getRealPath();
  }
}

$app->get('/', Base::class)
  ->add(new ProVM\KI\Common\Middleware\Visits($app->getContainer()->get('file.visits'), $app->getContainer()->get('visits.time')));
