From 89c409e469f6e5c977ae4cb18c6895cc3a9c8252 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marko=20Ivan=C4=8Di=C4=87?= <marko.ivancic@srce.hr>
Date: Mon, 13 Jun 2022 10:55:38 +0200
Subject: [PATCH] WIP

---
 composer.json                          |  5 +++++
 config-templates/module_accounting.php |  5 +++++
 routing/routes/routes.yaml             |  4 ++++
 src/Controller/Test.php                | 11 +++++++++++
 4 files changed, 25 insertions(+)
 create mode 100644 config-templates/module_accounting.php
 create mode 100644 routing/routes/routes.yaml
 create mode 100644 src/Controller/Test.php

diff --git a/composer.json b/composer.json
index 30109d0..b24da28 100644
--- a/composer.json
+++ b/composer.json
@@ -14,6 +14,11 @@
             "simplesamlphp/composer-module-installer": true
         }
     },
+    "autoload": {
+        "psr-4": {
+            "SimpleSAML\\Module\\accounting\\": "src/"
+        }
+    },
     "require": {
         "php": "^7.4 || ^8.0",
         "ext-pdo": "*",
diff --git a/config-templates/module_accounting.php b/config-templates/module_accounting.php
new file mode 100644
index 0000000..8efd023
--- /dev/null
+++ b/config-templates/module_accounting.php
@@ -0,0 +1,5 @@
+<?php
+
+$config = [
+
+];
\ No newline at end of file
diff --git a/routing/routes/routes.yaml b/routing/routes/routes.yaml
new file mode 100644
index 0000000..9ac5397
--- /dev/null
+++ b/routing/routes/routes.yaml
@@ -0,0 +1,4 @@
+
+accounting-test:
+    path:       /test
+    defaults:   { _controller: 'SimpleSAML\Module\accounting\Controller\Test::test' }
diff --git a/src/Controller/Test.php b/src/Controller/Test.php
new file mode 100644
index 0000000..d020faa
--- /dev/null
+++ b/src/Controller/Test.php
@@ -0,0 +1,11 @@
+<?php
+
+namespace SimpleSAML\Module\accounting\Controller;
+
+class Test
+{
+    public function test(): void
+    {
+        echo 'test';
+    }
+}
-- 
GitLab