xref: /plugin/aichat/vendor/vanderlee/php-sentence/tests/bootstrap.php (revision 8817535b0c67f8b10e9b8c05dcdf58fc17827423)
1*8817535bSAndreas Gohr<?php
2*8817535bSAndreas Gohr
3*8817535bSAndreas Gohrspl_autoload_register(function ($class) {
4*8817535bSAndreas Gohr    static $prefix = 'Vanderlee\\Sentence\\';
5*8817535bSAndreas Gohr    if (stripos($class, $prefix) === 0) {
6*8817535bSAndreas Gohr        $file = str_replace('\\', DIRECTORY_SEPARATOR,
7*8817535bSAndreas Gohr            dirname(__DIR__).'\\src\\'.str_ireplace($prefix, '', $class).'.php');
8*8817535bSAndreas Gohr        if (is_file($file)) {
9*8817535bSAndreas Gohr            /** @noinspection PhpIncludeInspection */
10*8817535bSAndreas Gohr            require_once $file;
11*8817535bSAndreas Gohr        }
12*8817535bSAndreas Gohr    }
13*8817535bSAndreas Gohr});