Пример #1
0
 public static function loadClass($className)
 {
     // If last Php version is used with the automatic loader (if user doesn't know the Php version)
     if (strpos($className, 'Logriver_') === 0) {
         require_once dirname(__FILE__) . '/../LogriverAuto/Autoloader.php';
         return \LogriverAuto_Autoloader::loadClass($className);
     } elseif (strpos($className, 'Logriver\\') === 0) {
         $file = dirname(__FILE__) . '/../' . str_replace(array("", '\\'), array('', DIRECTORY_SEPARATOR), $className) . '.php';
         if (is_file($file)) {
             require $file;
             return true;
         }
     }
     return null;
 }
Пример #2
0
<?php

/*
 * This file is part of LogRiver package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @author LogRiver <*****@*****.**>
 */
error_reporting(E_ALL | E_STRICT);
require dirname(__FILE__) . '/../src/LogriverAuto/Autoloader.php';
LogriverAuto_Autoloader::register();