1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-21 11:26:38 +02:00
ttrss/include/autoload.php
Andrew Dolgov 3fd7856543 * switch to composer for qrcode and otp dependencies
* move most OTP-related stuff into userhelper
* remove old phpqrcode and otphp libraries
2021-02-26 19:16:17 +03:00

18 lines
528 B
PHP

<?php
spl_autoload_register(function($class) {
$root_dir = dirname(__DIR__); // we were in tt-rss/include
// - internal tt-rss classes are loaded from classes/ and use special naming logic instead of namespaces
// - plugin classes are loaded by PluginHandler from plugins.local/ and plugins/
$class_file = "$root_dir/classes/" . str_replace("_", "/", strtolower($class)) . ".php";
if (file_exists($class_file))
include $class_file;
});
// also pull composer autoloader
require_once "vendor/autoload.php";