Esempio n. 1
0
 public function info($msg = '', $param1 = null, $param2 = null, $param3 = null)
 {
     $num = func_num_args();
     if ($num > 1) {
         $params = func_get_args();
         unset($params[0]);
         $msg = PsStrings::replaceWithParams('{}', $msg, $params);
     }
     $this->logger->doWrite($this->id, $msg);
 }
Esempio n. 2
0
 public function buildContent()
 {
     $RQ = GetArrayAdapter::inst();
     $AL = PsLogger::controller();
     $PARAMS['num'] = $AL->getLastSessionId();
     $PARAMS['enabled'] = ConfigIni::isLoggingEnabled();
     $mode = null;
     if ($RQ->has('file')) {
         $mode = self::MODE_FILE;
         $PARAMS['folder'] = $RQ->str('folder');
         $PARAMS['files'] = $AL->getLogFiles($RQ->str('folder'));
         $PARAMS['file'] = $AL->getLogFile($RQ->str('folder'), $RQ->str('file'));
     }
     if (!$mode && $RQ->has('folder')) {
         $mode = self::MODE_FILES;
         $PARAMS['folder'] = $RQ->str('folder');
         $PARAMS['files'] = $AL->getLogFiles($RQ->str('folder'));
     }
     if (!$mode) {
         $PARAMS['folders'] = $AL->getLogDirs();
         $mode = self::MODE_FOLDERS;
     }
     $PARAMS['mode'] = $mode;
     echo $this->getFoldedEntity()->fetchTpl($PARAMS);
 }
Esempio n. 3
0
 /**
  * Очищает все кеши
  */
 public static function clearAll()
 {
     PsLogger::inst(__CLASS__)->info('! Clear all db caches');
     foreach (self::$CACHES as $class => $cache) {
         self::clear($class);
     }
 }
Esempio n. 4
0
 private function __construct(array $params)
 {
     ExternalPluginsManager::SpriteGenerator();
     $this->CssSpriteGen = new CssSpriteGen($params);
     $this->LOGGER = PsLogger::inst(__CLASS__);
     $this->PROFILER = PsProfiler::inst(__CLASS__);
 }
Esempio n. 5
0
 private function __construct(array $params)
 {
     PsLibs::inst()->SpriteGenerator();
     $this->CssSpriteGen = new CssSpriteGen($params);
     $this->LOGGER = PsLogger::inst(__CLASS__);
     $this->PROFILER = PsProfiler::inst(__CLASS__);
 }
Esempio n. 6
0
 /** @return ADORecordSet */
 private static function executeQuery($query, $params = false, &$queryFinal = null, array &$paramsFinal = null)
 {
     $queryFinal = $query instanceof Query ? $query->build($params) : $query;
     $queryFinal = normalize_string($queryFinal);
     $paramsFinal = to_array($params);
     $LOGGER = PsLogger::inst(__CLASS__);
     $PROFILER = PsProfiler::inst(__CLASS__);
     $PROFILER->start(strtolower($queryFinal));
     try {
         if ($LOGGER->isEnabled()) {
             $LOGGER->info("[{$queryFinal}]" . ($paramsFinal ? ', PARAMS: ' . array_to_string($paramsFinal) : ''));
         }
         $rs = PsConnectionPool::conn()->execute($queryFinal, $paramsFinal);
         if (is_object($rs)) {
             $PROFILER->stop();
             return $rs;
         }
         $error = PsConnectionPool::conn()->ErrorMsg();
         $LOGGER->info('ERROR: {}', $error);
         throw new DBException($error, DBException::ERROR_NOT_CLASSIFIED, $queryFinal, $paramsFinal);
     } catch (Exception $ex) {
         $PROFILER->stop(false);
         if ($ex instanceof DBException) {
             ExceptionHandler::dumpError($ex);
         }
         throw $ex;
     }
 }
Esempio n. 7
0
 /**
  * Метод убеждается в том, что провайдер безопасности установлен.
  * Наша задача - установить провайдер один раз и проверить, чтобы он больше не менялся.
  */
 public static function init()
 {
     self::$inited = check_condition(!self::$inited, 'Cannot initialize ' . __CLASS__ . ' twice');
     if (self::$provider instanceof PsSecurityProvider) {
         //Провайдер безопастности был уже установлен
     } else {
         check_condition(is_null(self::$provider), __CLASS__ . ' is not correctly initialized');
         if (PsContext::isCmd()) {
             //Если работаем под процессом - установим специальный провайдер безопастности
             self::$provider = new PsSecurityProviderCmd();
         } else {
             //Устанавливаем базовый провайдер безопасности на основе сессии
             self::$provider = new PsSecurityProviderSdk();
         }
     }
     check_condition(!PsContext::isCmd() || self::$provider instanceof PsSecurityProviderCmd, 'Invalid security provider for cmd process');
     $LOGGER = PsLogger::inst(__CLASS__);
     if ($LOGGER->isEnabled()) {
         $LOGGER->info('Context:       {}', PsContext::describe());
         $LOGGER->info('Provider:      {}', get_class(self::$provider));
         $LOGGER->info('Is authorized: {}', var_export(self::$provider->isAuthorized(), true));
         $LOGGER->info('Is admin:      {}', var_export(self::$provider->isAuthorizedAsAdmin(), true));
         $LOGGER->info('User ID:       {}', self::$provider->getUserId());
     }
 }
Esempio n. 8
0
 /**
  * Основной метод получения экземпляра.
  * 
  * @param type $silentOnDoubleTry - признак, стоит ли нам ругаться, если мы 
  * обнаруживаем зацикливание при попытке получения экземпляра класса.
  * 
  * Это нужно для классов, которые выполняют сложную логику в конструкторе, которая
  * может привести к повторному вызову ::inst() внутри этого конструктора.
  * 
  * Классы, которые используют эту возможность:
  * @link DbChangeListener - менеджер прослушивания изменений в БД
  */
 protected static function inst($silentOnDoubleTry = false)
 {
     $class = get_called_class();
     if (array_key_exists($class, self::$_insts_)) {
         return self::$_insts_[$class];
     }
     if (array_key_exists($class, self::$_instsrq_)) {
         if ($silentOnDoubleTry) {
             return null;
         }
         raise_error("Double try to get singleton of [{$class}]");
     }
     self::$_instsrq_[$class] = true;
     //Создаём экземпляр
     $sec = Secundomer::startedInst("Creating singleton of {$class}");
     self::$_insts_[$class] = new $class();
     $sec->stop();
     //Экземпляр успешно создан
     unset(self::$_instsrq_[$class]);
     //Теперь добавим в профайлер. Всё это нужно для защиты от зацикливания.
     PsProfiler::inst(__CLASS__)->add($class, $sec);
     //Добавим к глобальному секундомеру - текущий
     $SECUNDOMER = self::$_secundomer_ ? self::$_secundomer_ : (self::$_secundomer_ = Secundomer::inst());
     $SECUNDOMER->addSecundomer($sec);
     //Отлогируем
     PsLogger::inst(__CLASS__)->info("+ {$class} ({$sec->getAverage()} / {$SECUNDOMER->getTotalTimeRounded()})");
     return self::$_insts_[$class];
 }
Esempio n. 9
0
 /**
  * Метод вызывается для инициализации окружения:
  * 1. Директория ресурсов окружения будет подключена в Autoload
  * 2. Файл, включающий окружение, будет выполнен
  */
 public static function init()
 {
     if (self::$inited) {
         return;
         //---
     }
     self::$inited = true;
     //---
     /*
      * Проверим, нужно ли подключать окружение
      */
     if (self::isSkipInclude()) {
         return;
         //---
     }
     $env = self::env();
     if (!$env) {
         return;
         //---
     }
     $envDir = array_get_value($env, ConfigIni::environments());
     if (!$envDir) {
         return PsUtil::raise('Environment [{}] not found', $env);
     }
     if (!is_dir($envDir)) {
         return PsUtil::raise('Environment dir for [{}] not found', $env);
     }
     $envSrcDir = next_level_dir($envDir, DirManager::DIR_SRC);
     $envIncFile = file_path($envDir, $env, PsConst::EXT_PHP);
     if (!is_file($envIncFile)) {
         return PsUtil::raise('Environment include file for [{}] not found', $env);
     }
     $LOGGER = PsLogger::inst(__CLASS__);
     if ($LOGGER->isEnabled()) {
         $LOGGER->info('Including \'{}\' environment for context \'{}\'', $env, PsContext::describe());
         $LOGGER->info('Env dir:  {}', $envDir);
         $LOGGER->info('Src dir:  {}', $envSrcDir);
         $LOGGER->info('Inc file: {}', $envIncFile);
     }
     //Проинициализировано окружение
     self::$included = true;
     //Регистрируем директорию с классами, специфичными только для данного окружения
     Autoload::inst()->registerBaseDir($envSrcDir, false);
     //Выполним необходимое действие
     $PROFILER = PsProfiler::inst(__CLASS__);
     try {
         $LOGGER->info('{');
         $PROFILER->start($env);
         self::initImpl($LOGGER, $envIncFile);
         $secundomer = $PROFILER->stop();
         $LOGGER->info('}');
         $LOGGER->info('Inc file included for {} sec', $secundomer->getTime());
     } catch (Exception $ex) {
         $PROFILER->stop(false);
         $LOGGER->info('Inc file execution error: [{}]', $ex->getMessage());
         throw $ex;
         //---
     }
 }
Esempio n. 10
0
 protected static final function isInclude($key)
 {
     if (array_key_exists($key, self::$included)) {
         return false;
     }
     self::$included[$key] = true;
     PsLogger::inst(__CLASS__)->info('+ {}', $key);
     return true;
 }
Esempio n. 11
0
 private function __construct(array $cells, $w, $h, $checkUser)
 {
     $this->LOGGER = PsLogger::inst(__CLASS__);
     $this->w = $w;
     $this->h = $h;
     $this->checkUser = !!$checkUser;
     $this->result = array();
     $this->doProcess($cells);
 }
 /**
  * Конструктор
  */
 protected final function __construct()
 {
     $this->LOGGER = PsLogger::inst(__CLASS__);
     /*
      * Подключаться к БД будем в MainImport, чтобы не подключиться заранее
      */
     //Поумолчанию коннектимся на продуктив
     //$this->CONNECTION_PARAMS = PsConnectionParams::get(PsConnectionParams::CONN_PRODUCTION);
 }
Esempio n. 13
0
 private function __construct($name, Spritable $spritable)
 {
     $this->LOGGER = PsLogger::inst(__CLASS__);
     $this->spritable = $spritable;
     $this->name = $name;
     $this->cssDi = self::autogenWs($name)->getDirItem(null, $name, 'css');
     $this->imgDi = self::autogenWs($name)->getDirItem(null, $name, PsImg::getExt(SYSTEM_IMG_TYPE));
     $this->LOGGER->info("INSTANCE CREATED FOR [{$name}]");
     $this->rebuild(false);
 }
Esempio n. 14
0
function dimpConsoleLog()
{
    global $CALLED_FILE;
    if ($CALLED_FILE) {
        $log = file_path(dirname($CALLED_FILE), get_file_name($CALLED_FILE), 'log');
        $FULL_LOG = PsLogger::controller()->getFullLog();
        $FULL_LOG = mb_convert_encoding($FULL_LOG, 'UTF-8', 'cp866');
        file_put_contents($log, $FULL_LOG);
    }
}
Esempio n. 15
0
 /**
  * Вызов выполнения метода. Используется из ajax.
  */
 public static function execute($method, array $params)
 {
     check_condition(array_key_exists($method, self::getMethodsList()), "Method TestManager::{$method} cannot be called");
     PsUtil::startUnlimitedMode();
     PsLogger::inst('TestManager')->info("Method TestManager::{$method} called with params: " . array_to_string($params));
     $s = Secundomer::startedInst();
     call_user_func_array(array(TestManager::inst(), $method), $params);
     $s->stop();
     PsLogger::inst('TestManager')->info("Call done in {$s->getTotalTime()} seconds");
 }
Esempio n. 16
0
 protected final function __construct()
 {
     $this->CLASS = get_called_class();
     PsUtil::assertClassHasDifferentConstValues($this->CLASS, 'CODE_');
     PsUtil::assertClassHasDifferentConstValues($this->CLASS, 'ACTION_');
     $this->ACTIONS = PsUtil::getClassConsts($this->CLASS, 'ACTION_');
     $this->LOGGER = PsLogger::inst($this->CLASS);
     $this->PROCESS_CODE = $this->getProcessCode();
     check_condition(in_array($this->PROCESS_CODE, PsUtil::getClassConsts(__CLASS__, 'CODE_')), "Класс [{$this->CLASS}] использует незарегистрированный код аудита [{$this->PROCESS_CODE}].");
     $this->SESSION = SESSION_AUDIT_ACTION . '-' . $this->CLASS . '-' . $this->PROCESS_CODE;
 }
Esempio n. 17
0
 /**
  * Функция, выполняющая закрытие классов.
  * Должна быть именно public, иначе не будет вызвана!
  */
 static final function _doShotdown()
 {
     PsCheck::arr(self::$DESTRUCTS);
     ksort(self::$DESTRUCTS);
     /* @var $inst Destructable */
     foreach (self::$DESTRUCTS as $ord => $inst) {
         //Пишем в логгер до закрытия класса, так как логгер закрывается последним
         PsLogger::inst(__CLASS__)->info($ord . '. ' . get_class($inst) . ' - desctucted');
         $inst->onDestruct();
     }
     self::$DESTRUCTS = null;
 }
Esempio n. 18
0
 /**
  * Метод добавляет шорткоды
  * TODO - вынести на конфиги
  */
 public static function addShortcodes()
 {
     $wpShortcodes = new PsWpShortCodes();
     $methods = PsUtil::getClassMethods($wpShortcodes, true, false, true, false);
     $LOGGER = PsLogger::inst(__CLASS__);
     $LOGGER->info();
     $LOGGER->info(__METHOD__);
     foreach ($methods as $action) {
         $LOGGER->info(' + {}', $action);
         add_shortcode($action, array($wpShortcodes, $action));
     }
 }
Esempio n. 19
0
 /**
  * Конструктор у класса-источника может быть только один
  */
 private final function __construct($class, array $params, $mident, $hash)
 {
     $this->CLASS = $class;
     $this->LOGGER = PsLogger::inst($class);
     $this->HASH = $hash;
     $this->MIDENT = $mident;
     $this->PARAMS = $params;
     check_condition($this->HASH, 'Уникальный код источника не может быть пустым');
     check_condition($this->MIDENT, 'Идентификатор маппинга не может быть пустым');
     check_condition(is_array($this->PARAMS), 'Параметры построения источника должны быть массивом');
     $this->init($mident, $params);
 }
Esempio n. 20
0
 public function __construct()
 {
     /**
      * Подключаем cache lite
      */
     PsLibs::inst()->CacheLite();
     /*
      * Конфигурируем
      */
     $liteOptions = array('readControl' => true, 'writeControl' => true, 'readControlType' => 'md5', 'automaticSerialization' => true, 'cacheDir' => DirManager::autogen('cache-lite')->absDirPath(), 'lifeTime' => ConfigIni::cacheFileLifetime() * 60, 'caching' => true);
     if (PsLogger::isEnabled()) {
         PsLogger::inst(__CLASS__)->info('Lite options: {}', print_r($liteOptions, true));
     }
     $this->IMPL = new Cache_Lite($liteOptions);
 }
Esempio n. 21
0
 public function __call($method, $arguments)
 {
     $method = first_char_remove($method);
     $source = $arguments[0];
     /* @var $template Smarty_Internal_Template */
     $template = $arguments[1];
     $tplPath = $template->template_resource;
     //PsProfiler::inst(__CLASS__)->start($method);
     $result = $this->{$method}($source);
     //PsProfiler::inst(__CLASS__)->stop();
     $call = ++$this->CALLS[$method];
     $callttl = ++$this->CALLTTL;
     $callInfo = pad_right("[{$callttl}-{$call}].", 10, ' ');
     PsLogger::inst(__CLASS__)->info("{} {} filter called for template {}.", $callInfo, ucfirst($method), $tplPath);
     return $result;
 }
Esempio n. 22
0
 private function __construct($id)
 {
     $this->id = 1 * $id;
     $this->BEAN = MosaicImgBean::inst();
     $params = ArrayAdapter::inst($this->BEAN->getImgInfo($this->id));
     $this->width = $params->int('w');
     $this->height = $params->int('h');
     $this->cellsXcnt = $params->int('cx');
     $this->cellsYcnt = $params->int('cy');
     $this->cellWidth = $params->int('cw');
     $this->cellHeight = $params->int('ch');
     $this->cellsTotal = $this->cellsXcnt * $this->cellsYcnt;
     $this->LOGGER = PsLogger::inst(__CLASS__);
     $this->PROFILER = PsProfiler::inst(__CLASS__);
     $this->tryResyncImg();
 }
Esempio n. 23
0
 protected function __construct()
 {
     //Извлекаем все изменённые сущности БД
     $CHANGED = DbBean::inst()->getChangedEntitys();
     if (empty($CHANGED)) {
         return;
         //---
     }
     $LOGGER = PsLogger::inst(__CLASS__);
     $LOGGER->info('Изменённые сущности БД: ' . print_r($CHANGED, true));
     foreach ($CHANGED as $chEntity) {
         $type = $chEntity['v_type'];
         $entity = $chEntity['v_entity'];
         $TypeEntity = "{$type} {$entity}";
         switch ($type) {
             /*
              * 1. Проверим изменённые сущности фолдинга
              */
             case DbBean::CHANGE_FOLD_ENT:
                 $fentity = Handlers::getInstance()->getFoldedEntityByUnique($entity, false);
                 if ($fentity) {
                     $LOGGER->info('[{}] -> Сущность фолдинга [{}]', $TypeEntity, $fentity->getUnique());
                     FoldedResourcesManager::onEntityAction(FoldedResourcesManager::ACTION_ENTITY_CHANGED_DB, $fentity->getFolding(), $fentity->getIdent());
                     $fentity->onEntityChanged();
                 }
                 break;
                 /*
                  * 2. Проверим изменённые таблицы/представления
                  */
             /*
              * 2. Проверим изменённые таблицы/представления
              */
             case DbBean::CHANGE_TABLE:
             case DbBean::CHANGE_VIEW:
                 /* @var $folding FoldedResources */
                 foreach (FoldedResourcesManager::inst()->getTableOrViewFoldings($entity) as $folding) {
                     $LOGGER->info('[{}] -> Фолдинг [{}]', $TypeEntity, $folding->getUnique());
                     $folding->onFoldingChanged();
                 }
                 foreach (PSCache::inst()->onDbEntityChanged($entity) as $cacheGr) {
                     $LOGGER->info('[{}] -> Группа кеширования [{}]', $TypeEntity, $cacheGr);
                 }
                 break;
         }
     }
 }
 protected final function __construct()
 {
     $this->LOGGER = PsLogger::inst(__CLASS__);
     $class = 'Memcache';
     if (!class_exists($class)) {
         $this->LOGGER->info($class . ' class is not exists!');
         return;
         //---
     }
     $this->MEMCACHE = new $class();
     if (!@$this->MEMCACHE->connect('127.0.0.1', 11211)) {
         $this->LOGGER->info('Could not connect to localhost!');
         $this->MEMCACHE = null;
         return;
         //---
     }
     $this->LOGGER->info($class . ' is enabled.');
 }
Esempio n. 25
0
 protected function executeImpl(ArrayAdapter $params)
 {
     $action = $params->str('action');
     $controller = PsLogger::controller();
     switch ($action) {
         case 'reset':
             $controller->clearLogs();
             break;
         case 'on':
             $controller->setLoggingEnabled(true);
             break;
         case 'off':
             $controller->setLoggingEnabled(false);
             break;
         default:
             json_error("Unknown action [{$action}].");
     }
     return new AjaxSuccess();
 }
Esempio n. 26
0
 private function executeImpl($lifeTimeOnCall, $__FUNCTION__)
 {
     if ($this->called) {
         return $this->executed;
         //---
     }
     $this->called = true;
     $LOGGER = PsLogger::inst(__CLASS__);
     $LOGGER->info("Function [{$__FUNCTION__}] called.");
     $needProcess = false;
     $LOCKFILE = DirManager::autogen('service')->getDirItem(null, __CLASS__, 'lock');
     if ($LOCKFILE->isFile()) {
         $lifeTime = $LOCKFILE->getFileLifetime();
         $needProcess = !$lifeTime || !$lifeTimeOnCall || $lifeTime >= $lifeTimeOnCall;
         $LOGGER->info('{} process. Lock file modified {} seconds ago. Process delay: {} seconds.', $needProcess ? 'Need' : 'Not need', $lifeTime, $lifeTimeOnCall);
     } else {
         $needProcess = true;
         $LOGGER->info('Need process. Lock file is not exists.');
     }
     if (!$needProcess) {
         return $this->executed;
         //---
     }
     $locked = PsLock::lock(__CLASS__, false);
     $LOGGER->info('External process lock {} execution.', $locked ? 'acquired, start' : 'not acquired, skip');
     if ($locked) {
         $LOCKFILE->touch();
         PsUtil::startUnlimitedMode();
         //Отпустим лок, так как внутри он может потребоваться для выполнения других действий, например для перестройки спрайтов
         PsLock::unlock();
         //Начинаем выполнение
         $this->executed = true;
         $job = new ExternalProcessJob();
         PsProfiler::inst(__CLASS__)->start(__FUNCTION__);
         $job->execute();
         $secundomer = PsProfiler::inst(__CLASS__)->stop();
         if ($secundomer) {
             $LOGGER->info("{$secundomer}");
         }
     }
     return $this->executed;
 }
Esempio n. 27
0
 /**
  * Конструктор. В нём мы составим полный список директорий, в которых потом будет производиться поиск
  * 
  * @param type $absDirPath
  * @param array $excluded
  * @param array $included
  */
 private function __construct($absDirPath, array $excluded, array $included)
 {
     $this->LOGGER = PsLogger::inst(__CLASS__);
     $this->PROFILER = PsProfiler::inst(__CLASS__);
     $this->PATH = ensure_dir_endswith_dir_separator($absDirPath);
     $this->LOGGER->info("Dir: [{$this->PATH}]");
     foreach ($excluded as $dir) {
         $path = ensure_dir_endswith_dir_separator(array($absDirPath, $dir));
         $this->EXCLUDED[] = $path;
         $this->LOGGER->info("ExcludeDir: [{$path}]");
     }
     foreach ($included as $dir) {
         $path = ensure_dir_endswith_dir_separator(array($absDirPath, $dir));
         $this->INCLUDED[] = $path;
         $this->LOGGER->info("IncludeDir: [{$path}]");
     }
     $this->LOGGER->info('Filling dirs for search');
     $this->PROFILER->start('Fill search dirs');
     $this->fillWithDirs($this->PATH);
     $this->LOGGER->info('Total dirs for search count: {}, excluded dirs: {}. Taken time: {}sec.', count($this->DIRS), count($this->DIRSEXCLUDED), $this->PROFILER->stop()->getTime());
     foreach ($this->DIRSEXCLUDED as $path) {
         $this->LOGGER->info("- {$path}");
     }
 }
Esempio n. 28
0
 /** @return PsLoggerInterface - логгер для данного класса сущности фолдинга */
 protected final function LOGGER()
 {
     return PsLogger::inst(get_called_class());
 }
Esempio n. 29
0
 /**
  * Метод возвращает логгер для того, чтобы в него могли писать другие подсистемы,
  * занимающиеся поиском классов.
  * 
  * @return PsLoggerInterface
  */
 public static function getLogger()
 {
     return PsLogger::inst(__CLASS__);
 }
Esempio n. 30
0
 /**
  * Основной метод, выполняющий подключение всех классов из kitcore.
  * Нужно постараться сделать так, чтобы он отрабатывал максимально быстро,
  * так как мы используем его вместо принудительного подключения всех классов
  * через require_once.
  * Возможно для ускорения работы однажды мы так и сделаем.
  */
 public function includeCore()
 {
     if ($this->CALLED) {
         die(__CLASS__ . ' cannot be called twice.');
     }
     $this->CALLED = true;
     /*
      * Засекаем время подключения
      */
     $time = microtime(true);
     /*
      * Сразу подключаем  настройки и утилитные функции
      */
     include_once 'Globals.php';
     include_once 'Defines.php';
     /*
      * Инициализируем глобальные коллекции, так как доступ к ним будет
      * осуществляться из всех методов данного класса.
      */
     $this->PATHES = array();
     $this->INCLUDED = array();
     /*
      * Собираем классы из kitcore, которые нужно подключить.
      * Пути к php-классам будут собраны в переменную класса, чтобы к ним был
      * доступ и из функции autoload.
      */
     self::loadClassPath(__DIR__, $this->PATHES, true);
     /*
      * Подключим слушатель ошибки загрузки файлов, так как классы могут быть
      * загружены не в правильном порядке.
      */
     spl_autoload_register(array($this, '_autoload'));
     /*
      * Начинаем подключение
      */
     foreach ($this->PATHES as $name => $path) {
         if (!array_key_exists($name, $this->INCLUDED)) {
             /*
              * Поставим отметку о том, что файл загружен напрямую.
              * Если этого не случится, то в функции автоподключение это 
              * будет переопределено.
              */
             $this->INCLUDED[$name] = 'Directly';
             include_once $path;
         }
     }
     /*
      * Отключим обработчки ошибок, так как он нам больше не нужен.
      */
     spl_autoload_unregister(array($this, '_autoload'));
     /*
      * Теперь можно использовать логгер для вывода информации о логировании
      */
     if (PsLogger::isEnabled()) {
         $time = microtime(true) - $time;
         PsLogger::inst(__FILE__)->info('File pathes: ' . print_r($this->PATHES, true));
         PsLogger::inst(__FILE__)->info('Include order: ' . print_r($this->INCLUDED, true));
         PsLogger::inst(__FILE__)->info('Total time: ' . $time);
     }
     /*
      * Освободим память
      */
     unset($this->PATHES);
     unset($this->INCLUDED);
 }