17 lines
540 B
PHP
17 lines
540 B
PHP
|
|
<?php
|
||
|
|
/**
|
||
|
|
* Autoloader for the plugin's own classes plus the vendored dependencies.
|
||
|
|
*
|
||
|
|
* Kept separate from init.php so the extraction engine can be exercised from the
|
||
|
|
* CLI (bin/extract.php) without bootstrapping tt-rss.
|
||
|
|
*/
|
||
|
|
require_once __DIR__ . '/vendor/autoload.php';
|
||
|
|
|
||
|
|
spl_autoload_register(function (string $class): void {
|
||
|
|
if (!str_starts_with($class, 'AfFulltext\\')) return;
|
||
|
|
|
||
|
|
$path = __DIR__ . '/lib/' . str_replace('\\', '/', substr($class, strlen('AfFulltext\\'))) . '.php';
|
||
|
|
|
||
|
|
if (is_readable($path)) require_once $path;
|
||
|
|
});
|