<?php
spl_autoload_register(function ($class_name) {
    global $includes;
    foreach (glob(__DIR__ . "/*.php") as $filename) {
        if((str_replace('Dadata\\', '', $class_name) . '.php') === basename($filename) && !class_exists($class_name) && __FILE__ !== $filename && file_exists($filename)){


            file_put_contents(sfConfig::get('sf_log_dir') . '/auto', $class_name . "\n\n", FILE_APPEND);


            require_once $filename;
        }
    }
});
foreach (glob(__DIR__ . "/*.php") as $filename) {
    if(__FILE__ !== $filename && file_exists($filename) && basename($filename) !== 'ClientBase.php'){
        require_once $filename;
    }
}