Ejemplo n.º 1
0
 public function index4Action()
 {
     echo __METHOD__;
     $autoloader = new \Zend\Loader\ClassMapAutoloader();
     $autoloader->registerAutoloadMap(LIBRARY_PATH . '/../../../Autoloader/Autoloader.php');
     $autoloader->register();
     $student = new \Database\Student();
     $teacher = new \Database\Teacher();
     $worker = new \Database\Oracle\Worker();
     return false;
 }
Ejemplo n.º 2
0
 public function index04Action()
 {
     echo "<h3 style='color:red;font-weight:bold'>" . __METHOD__ . "</h3>";
     $autoLoader = new \Zend\Loader\ClassMapAutoloader();
     $autoLoader->registerAutoloadMap(LIB_PATH . "/ClassMap/AutoLoader.php");
     $autoLoader->register();
     $student = new \Database\Student();
     $teacher = new \Database\Teacher();
     $sender = new \Mail_Sender();
     return false;
 }
Ejemplo n.º 3
0
<?php

require_once __DIR__ . '/../library/Zend/Loader/ClassMapAutoloader.php';
$loader = new Zend\Loader\ClassMapAutoloader();
$loader->registerAutoloadMap(__DIR__ . '/../library/Zend/.classmap.php');
$loader->register();
if (!class_exists('Zend\\Controller\\Action')) {
    echo "Could not find action class!\n";
} else {
    echo "Found action class!\n";
}
if (!class_exists('Zend\\Version')) {
    echo "Could not find version class!\n";
} else {
    echo "Found version class!\n";
}
Ejemplo n.º 4
0
        include_once "{$dir}{$item}.class.php";
        if (isset($_SESSION['glpi_use_mode']) && $_SESSION['glpi_use_mode'] == Session::DEBUG_MODE) {
            $DEBUG_AUTOLOAD[] = $classname;
        }
    } else {
        if (!isset($notfound["x{$classname}"])) {
            // trigger an error to get a backtrace, but only once (use prefix 'x' to handle empty case)
            //          trigger_error("GLPI autoload : file $dir$item.class.php not founded trying to load class '$classname'");
            $notfound["x{$classname}"] = true;
        }
    }
}
require_once GLPI_ROOT . '/lib/Zend/Loader/ClassMapAutoloader.php';
$loader = new Zend\Loader\ClassMapAutoloader();
// Register the class map:
$loader->registerAutoloadMap(GLPI_ROOT . '/lib/Zend/autoload_classmap.php');
// Register with spl_autoload:
$loader->register();
// SimplePie autoloader
spl_autoload_register(array(new SimplePie_Autoloader(), 'autoload'));
// Use spl autoload to allow stackable autoload.
spl_autoload_register('glpi_autoload');
/**
 * Autoloader class
 *
 * @since version 0.84
 *
 * @package SimplePie
**/
class SimplePie_Autoloader
{