HEX
Server: Apache/2.4.63 (Unix)
System: Linux pinkman.beget.ru 5.10.258-0-beget-acl #1 SMP Mon Jun 8 11:35:04 UTC 2026 x86_64
User: kulikosl (3031)
PHP: 8.4.6
Disabled: NONE
Upload Files
File: /home/k/kulikosl/kulikosl.beget.tech/public_html/roistat/CustomCRM/autoload.php
<?php
/**
 * Created by PhpStorm.
 * User: user
 * Date: 17/11/2018
 * Time: 16:09
 */

spl_autoload_register(
/**
 * @param string $class
 */
    function ($class) {
        $ns       = 'Roistat\\Connection';
        $prefixes = array(
            "{$ns}\\" => array(
                __DIR__ . '/src',
                __DIR__ . '/src/Library',
                __DIR__ . '/src/Object',
            ),
        );
        foreach ($prefixes as $prefix => $dirs) {
            $prefix_len = strlen($prefix);
            if (substr($class, 0, $prefix_len) !== $prefix) {
                continue;
            }
            $class = substr($class, $prefix_len);
            $part  = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';
            foreach ($dirs as $dir) {
                $dir  = str_replace('/', DIRECTORY_SEPARATOR, $dir);
                $file = $dir . DIRECTORY_SEPARATOR . $part;
                if (is_readable($file)) {
                    require $file;
                    return;
                }
            }
        }
    });