From bcd661488de087afab096c18aa55eda42e8c5226 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Sun, 30 Jun 2019 21:59:01 +0000
Subject: [PATCH] Move functions into classes to make them autoloader-compatibile

---
 config.php |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/config.php b/config.php
index d419565..7dd7aff 100644
--- a/config.php
+++ b/config.php
@@ -1,4 +1,5 @@
 <?php
+$tramTypes = new TramTypes();
 $sources = [
 	'bus' => [
 		'gtfsrt' => 'ftp://ztp.krakow.pl/VehiclePositions_A.pb',
@@ -8,7 +9,7 @@
 		'database' => 'mapping_A.sqlite3',
 		'result' => 'mapping_A.json',
 		'result_vehicles' => 'vehicles_A.html',
-		'mapper' => 'numToTypeB',
+		'mapper' => new BusTypes(),
 		'prefix' => 'b',
 	],
 	'tram' => [
@@ -19,7 +20,7 @@
 		'database' => 'mapping_T.sqlite3',
 		'result' => 'mapping_T.json',
 		'result_vehicles' => 'vehicles_T.html',
-		'mapper' => 'numToTypeT',
+		'mapper' => $tramTypes,
 		'prefix' => 't',
 	],
 	'tram2' => [
@@ -30,7 +31,7 @@
 		'database' => 'mapping_T.sqlite3',
 		'result' => 'mapping_T.json',
 		'result_vehicles' => 'vehicles_T.html',
-		'mapper' => 'numToTypeT',
+		'mapper' => $tramTypes,
 		'prefix' => 't',
 	],
 ]; 

--
Gitblit v1.9.1