Jacek Kowalski
2019-06-30 d0b22a371bdd4e8f09df8ba63c6206208c244c86
Use Composer's PSR-0 autoloader
4 files modified
2 files renamed
10 ■■■■ changed files
composer.json 5 ●●●●● patch | view | raw | blame | history
lib/Database.php patch | view | raw | blame | history
lib/Mapper.php patch | view | raw | blame | history
lib/fetch.php 2 ●●●●● patch | view | raw | blame | history
parse.php 2 ●●●●● patch | view | raw | blame | history
regenerate.php 1 ●●●● patch | view | raw | blame | history
composer.json
@@ -1,4 +1,9 @@
{
    "autoload": {
        "psr-0": {
            "": "lib/"
        }
    },
    "require": {
        "google/gtfs-realtime-bindings": "^0.0.2",
        "monolog/monolog": "^1.24",
lib/Database.php
lib/Mapper.php
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') {
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');
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');