From d0b22a371bdd4e8f09df8ba63c6206208c244c86 Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Sun, 30 Jun 2019 21:26:41 +0000 Subject: [PATCH] Use Composer's PSR-0 autoloader --- regenerate.php | 1 - parse.php | 2 -- lib/Database.php | 0 lib/Mapper.php | 0 lib/fetch.php | 2 -- composer.json | 5 +++++ 6 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 1adf1b5..21ddca9 100644 --- a/composer.json +++ b/composer.json @@ -1,4 +1,9 @@ { + "autoload": { + "psr-0": { + "": "lib/" + } + }, "require": { "google/gtfs-realtime-bindings": "^0.0.2", "monolog/monolog": "^1.24", diff --git a/lib/database.php b/lib/Database.php similarity index 100% rename from lib/database.php rename to lib/Database.php diff --git a/lib/mapper.php b/lib/Mapper.php similarity index 100% rename from lib/mapper.php rename to lib/Mapper.php diff --git a/lib/fetch.php b/lib/fetch.php index 57ffaaa..3c3ca75 100644 --- a/lib/fetch.php +++ b/lib/fetch.php @@ -1,6 +1,4 @@ <?php -require_once(__DIR__.'/FtpConnection.php'); - function ftp_fetch_if_newer($url, $file = NULL) { $url = parse_url($url); if(!isset($url['scheme']) || $url['scheme'] != 'ftp') { diff --git a/parse.php b/parse.php index 92acb04..3a81aa1 100644 --- a/parse.php +++ b/parse.php @@ -1,8 +1,6 @@ <?php require_once(__DIR__.'/vendor/autoload.php'); -require_once(__DIR__.'/lib/database.php'); require_once(__DIR__.'/lib/fetch.php'); -require_once(__DIR__.'/lib/mapper.php'); require_once(__DIR__.'/lib/output.php'); require_once(__DIR__.'/lib/vehicle_types.php'); require_once(__DIR__.'/config.php'); diff --git a/regenerate.php b/regenerate.php index 33db824..c157c82 100644 --- a/regenerate.php +++ b/regenerate.php @@ -1,6 +1,5 @@ <?php require_once(__DIR__.'/vendor/autoload.php'); -require_once(__DIR__.'/lib/database.php'); require_once(__DIR__.'/lib/output.php'); require_once(__DIR__.'/lib/vehicle_types.php'); require_once(__DIR__.'/config.php'); -- Gitblit v1.9.1