ClassLoader PHP Class Code Examples

This page contains top rated real world PHP examples of class ClassLoader extracted from open source projects. You can rate examples to help us improve the quality of examples

Example #1
Show file File: Doctrine.php Project: OmondiKevin/ADT_MTRH
0
 public function __construct()
 {
     // load database configuration from CodeIgniter
     require_once APPPATH . 'config/database.php';
     // Set up class loading. You could use different autoloaders, provided by your favorite framework,
     // if you want to.
     require_once APPPATH . 'libraries/Doctrine/Common/ClassLoader.php';
     $doctrineClassLoader = new ClassLoader('Doctrine', APPPATH . 'libraries');
     $doctrineClassLoader->register();
     $entitiesClassLoader = new ClassLoader('models', rtrim(APPPATH, '/'));
     $entitiesClassLoader->register();
     $proxiesClassLoader = new ClassLoader('Proxies', APPPATH . 'models/proxies');
     $proxiesClassLoader->register();
     // Set up caches
     $config = new Configuration();
     $cache = new ArrayCache();
     $config->setMetadataCacheImpl($cache);
     $config->setQueryCacheImpl($cache);
     // Set up driver
     $Doctrine_AnnotationReader = new \Doctrine\Common\Annotations\AnnotationReader($cache);
     $Doctrine_AnnotationReader->setDefaultAnnotationNamespace('Doctrine\\ORM\\Mapping\\');
     $driver = new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($Doctrine_AnnotationReader, APPPATH . 'models');
     $config->setMetadataDriverImpl($driver);
     // Proxy configuration
     $config->setProxyDir(APPPATH . '/models/proxies');
     $config->setProxyNamespace('Proxies');
     // Set up logger
     //$logger = new EchoSqlLogger;
     //$config->setSqlLogger($logger);
     $config->setAutoGenerateProxyClasses(TRUE);
     // Database connection information
     $connectionOptions = array('driver' => 'pdo_mysql', 'user' => $db['default']['username'], 'password' => $db['default']['password'], 'host' => $db['default']['hostname'], 'dbname' => $db['default']['database']);
     // Create EntityManager
     $this->em = EntityManager::create($connectionOptions, $config);
 }
Example #2
Show file File: autoload_real.php Project: runningjack/busticketAPI1
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit00efe4fa115a81a19371035a9e00878a', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit00efe4fa115a81a19371035a9e00878a', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $fileIdentifier => $file) {
         composerRequire00efe4fa115a81a19371035a9e00878a($fileIdentifier, $file);
     }
     return $loader;
 }
Example #3
Show file File: autoload_real.php Project: ymnl007/92five
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInitcd6375fd72de7bf05194cb074a6a5352', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInitcd6375fd72de7bf05194cb074a6a5352', 'loadClassLoader'));
     $includePaths = (require __DIR__ . '/include_paths.php');
     array_push($includePaths, get_include_path());
     set_include_path(join(PATH_SEPARATOR, $includePaths));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $file) {
         composerRequirecd6375fd72de7bf05194cb074a6a5352($file);
     }
     return $loader;
 }
Example #4
Show file File: autoload_real.php Project: El-Loco-Pinguino/FaitesUnVoeu_WF3
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit17b3bc04b0f6f3a71d4b7fb3eae40b19', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit17b3bc04b0f6f3a71d4b7fb3eae40b19', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $fileIdentifier => $file) {
         composerRequire17b3bc04b0f6f3a71d4b7fb3eae40b19($fileIdentifier, $file);
     }
     return $loader;
 }
Example #5
Show file File: autoload_real.php Project: adjaika/J3Base
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit205c915b9c7d3e718e7c95793ee67ffe', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit205c915b9c7d3e718e7c95793ee67ffe', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $fileIdentifier => $file) {
         composerRequire205c915b9c7d3e718e7c95793ee67ffe($fileIdentifier, $file);
     }
     return $loader;
 }
Example #6
Show file File: autoload_real.php Project: boots7458/elabftw
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit890cbe1d22a32e7ce12ec290aecf88d3', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit890cbe1d22a32e7ce12ec290aecf88d3', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $fileIdentifier => $file) {
         composerRequire890cbe1d22a32e7ce12ec290aecf88d3($fileIdentifier, $file);
     }
     return $loader;
 }
Example #7
Show file File: autoload_real.php Project: highestgoodlikewater/thinkphp-b2c-base-tdd
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit8af0e281d0e4badf72806ad0ec5e14cf', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit8af0e281d0e4badf72806ad0ec5e14cf', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $file) {
         composerRequire8af0e281d0e4badf72806ad0ec5e14cf($file);
     }
     return $loader;
 }
Example #8
Show file File: autoload_real.php Project: jsrhappy/TodoList
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit954fcf2e2058b96f6ac1ddf2dffc04cb', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit954fcf2e2058b96f6ac1ddf2dffc04cb', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $fileIdentifier => $file) {
         composerRequire954fcf2e2058b96f6ac1ddf2dffc04cb($fileIdentifier, $file);
     }
     return $loader;
 }
Example #9
Show file File: autoload_real.php Project: lhzhou/CodeIgniter_RESTful_API
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInita3afb4a8c7c5622711bbe6ba00c11de6', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInita3afb4a8c7c5622711bbe6ba00c11de6', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $fileIdentifier => $file) {
         composerRequirea3afb4a8c7c5622711bbe6ba00c11de6($fileIdentifier, $file);
     }
     return $loader;
 }
Example #10
Show file File: autoload_real.php Project: tahermarkos/Transport
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit6fef564960f9fbfe0ab761c02b719070', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit6fef564960f9fbfe0ab761c02b719070', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $file) {
         composerRequire6fef564960f9fbfe0ab761c02b719070($file);
     }
     return $loader;
 }
Example #11
Show file File: autoload_real.php Project: nfsecurity/the-fraud-explorer
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit540e5e67d7ddab8e4b4cf2d25eaa9b4a', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit540e5e67d7ddab8e4b4cf2d25eaa9b4a', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $fileIdentifier => $file) {
         composerRequire540e5e67d7ddab8e4b4cf2d25eaa9b4a($fileIdentifier, $file);
     }
     return $loader;
 }
Example #12
Show file File: autoload_real.php Project: emarkov111/crmapp510
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit0bb8ae7e65d920a17213811f594f3693', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit0bb8ae7e65d920a17213811f594f3693', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $fileIdentifier => $file) {
         composerRequire0bb8ae7e65d920a17213811f594f3693($fileIdentifier, $file);
     }
     return $loader;
 }
Example #13
Show file File: autoload_real.php Project: raphydev/onep
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit74118ceeb7488537ff3601ededf42c74', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit74118ceeb7488537ff3601ededf42c74', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $fileIdentifier => $file) {
         composerRequire74118ceeb7488537ff3601ededf42c74($fileIdentifier, $file);
     }
     return $loader;
 }
Example #14
Show file File: autoload_real.php Project: asgrim/joindin-api
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInitbe312af39897752bf33b8dfb0cb5182c', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInitbe312af39897752bf33b8dfb0cb5182c', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $file) {
         composerRequirebe312af39897752bf33b8dfb0cb5182c($file);
     }
     return $loader;
 }
Example #15
Show file File: autoload_real.php Project: olax/epetitions
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit2ed5568426bb8450106fd8a856246ab1', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit2ed5568426bb8450106fd8a856246ab1', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $file) {
         composerRequire2ed5568426bb8450106fd8a856246ab1($file);
     }
     return $loader;
 }
Example #16
Show file File: Doctrine.php Project: yamildiego/JY
0
 /**
  * constructor
  */
 public function __construct()
 {
     // load database configuration from CodeIgniter
     require APPPATH . 'config/database.php';
     // Set up class loading. You could use different autoloaders, provided by your favorite framework,
     // if you want to.
     require_once APPPATH . 'third_party/Doctrine/Common/ClassLoader.php';
     $doctrineClassLoader = new ClassLoader('Doctrine', APPPATH . 'third_party');
     $doctrineClassLoader->register();
     $entitiesClassLoader = new ClassLoader('models', rtrim(APPPATH, "/"));
     $entitiesClassLoader->register();
     $proxiesClassLoader = new ClassLoader('proxies', APPPATH . 'models');
     $proxiesClassLoader->register();
     // Set up caches
     $config = new Configuration();
     $cache = new ArrayCache();
     $config->setMetadataCacheImpl($cache);
     $driverImpl = $config->newDefaultAnnotationDriver(array(APPPATH . 'models/Entidades'));
     $config->setMetadataDriverImpl($driverImpl);
     $config->setQueryCacheImpl($cache);
     // Proxy configuration
     $config->setProxyDir(APPPATH . 'models/proxies');
     $config->setProxyNamespace('Proxies');
     // Set up logger
     //$logger = new EchoSQLLogger;
     //$config->setSQLLogger($logger);
     $config->setAutoGenerateProxyClasses(TRUE);
     // Database connection information
     $connectionOptions = array('driver' => 'pdo_mysql', 'user' => $db['default']['username'], 'password' => $db['default']['password'], 'host' => $db['default']['hostname'], 'dbname' => $db['default']['database']);
     // Create EntityManager
     $this->em = EntityManager::create($connectionOptions, $config);
 }
Example #17
Show file File: autoload_real.php Project: kylesm87/Clutch
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit8a2c283ac487e9d6232e48cacc990e6c', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit8a2c283ac487e9d6232e48cacc990e6c', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $fileIdentifier => $file) {
         composerRequire8a2c283ac487e9d6232e48cacc990e6c($fileIdentifier, $file);
     }
     return $loader;
 }
Example #18
Show file File: autoload_real.php Project: chesternaguit/laravel5-project-starter
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit34fd6526b3488adb03579cba64d004c6', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit34fd6526b3488adb03579cba64d004c6', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $fileIdentifier => $file) {
         composerRequire34fd6526b3488adb03579cba64d004c6($fileIdentifier, $file);
     }
     return $loader;
 }
Example #19
Show file File: autoload_real.php Project: koocyton/KT-LaraverBS
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderIniteffcd939319f6232383a7a42c08f792a', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderIniteffcd939319f6232383a7a42c08f792a', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $fileIdentifier => $file) {
         composerRequireeffcd939319f6232383a7a42c08f792a($fileIdentifier, $file);
     }
     return $loader;
 }
Example #20
Show file File: autoload_real.php Project: alexbonavila/Laravel5Fundamentals
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInitc45356d2d8628570ea0ff9cacc03b601', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInitc45356d2d8628570ea0ff9cacc03b601', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $file) {
         composerRequirec45356d2d8628570ea0ff9cacc03b601($file);
     }
     return $loader;
 }
Example #21
Show file File: autoload_real.php Project: ganboonhong/ng2blog50v1
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit692afab62107a08f13fd0507a3685008', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit692afab62107a08f13fd0507a3685008', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $file) {
         composerRequire692afab62107a08f13fd0507a3685008($file);
     }
     return $loader;
 }
Example #22
Show file File: autoload_real_files_by_dependency.php Project: alancleaver/composer
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInitFilesAutoloadOrder', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInitFilesAutoloadOrder', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $fileIdentifier => $file) {
         composerRequireFilesAutoloadOrder($fileIdentifier, $file);
     }
     return $loader;
 }
Example #23
Show file File: autoload_real.php Project: ronaldlunaramos/Mural
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit4471cd1f5e63e6c673588cd759dbc002', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit4471cd1f5e63e6c673588cd759dbc002', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $file) {
         composerRequire4471cd1f5e63e6c673588cd759dbc002($file);
     }
     return $loader;
 }
Example #24
Show file File: doctrine.php Project: csiber/codeigniterplus
0
 /**
  * constructor
  */
 public function __construct()
 {
     // load database configuration from CodeIgniter
     require APPPATH . 'config/database.php';
     // Set up class loading. You could use different autoloaders, provided by your favorite framework,
     // if you want to.
     //require_once APPPATH.'third_party/Doctrine/Common/ClassLoader.php';
     $doctrineClassLoader = new ClassLoader('Doctrine', APPPATH . '../vendor/doctrine');
     $doctrineClassLoader->register();
     $entitiesClassLoader = new ClassLoader('models', APPPATH . "models/Entities");
     $entitiesClassLoader->register();
     $proxiesClassLoader = new ClassLoader('proxies', APPPATH . 'models/proxies');
     $proxiesClassLoader->register();
     // Set up caches
     $config = new Configuration();
     //TODO this approach won't work always, developers may habe memcached installed, but not interested
     //to use or server not running. Need to fix.
     if (class_exists('Memcached')) {
         $memcache = new \Memcached();
         $memcache->addServer('127.0.0.1', 11211);
         $cacheDriver = new \Doctrine\Common\Cache\MemcachedCache();
         $cacheDriver->setMemcached($memcache);
     } else {
         if (extension_loaded('apc') && ini_get('apc.enabled')) {
             $cacheDriver = new \Doctrine\Common\Cache\ApcCache();
         } else {
             $cacheDriver = new \Doctrine\Common\Cache\ArrayCache();
         }
     }
     $config->setMetadataCacheImpl($cacheDriver);
     $driverImpl = $config->newDefaultAnnotationDriver(array(APPPATH . 'models/Entities'));
     $config->setMetadataDriverImpl($driverImpl);
     $config->setQueryCacheImpl($cacheDriver);
     // Proxy configuration
     $config->setProxyDir(APPPATH . 'models/proxies');
     $config->setProxyNamespace('Proxies');
     // Set up logger
     //$logger = new Doctrine\DBAL\Logging\CIProfiler();
     //$config->setSQLLogger($logger);
     $config->setAutoGenerateProxyClasses(TRUE);
     // Database connection information
     $connectionOptions = array('driver' => 'pdo_mysql', 'user' => $db['default']['username'], 'password' => $db['default']['password'], 'host' => $db['default']['hostname'], 'dbname' => $db['default']['database']);
     // Create EntityManager
     $this->em = EntityManager::create($connectionOptions, $config);
     foreach ($driverImpl->getAllClassNames() as $class) {
         require_once $entitiesClassLoader->getIncludePath() . "/" . $class . ".php";
     }
     //$this->generate_classes();
 }
Example #25
Show file File: Doctrine.php Project: michaelnavarro/zc
0
 /**
  * Register Doctrine autoloaders
  *
  * @param array Doctrine global configuration
  */
 private function registerAutoloaders(array $config = array())
 {
     $autoloader = \Zend_Loader_Autoloader::getInstance();
     $doctrineIncludePath = isset($config['includePath']) ? $config['includePath'] : APPLICATION_PATH . '/../library/Doctrine';
     require_once $doctrineIncludePath . '/Common/ClassLoader.php';
     $symfonyAutoloader = new \Doctrine\Common\ClassLoader('Symfony');
     $autoloader->pushAutoloader(array($symfonyAutoloader, 'loadClass'), 'Symfony');
     $doctrineExtensionsAutoloader = new \Doctrine\Common\ClassLoader('DoctrineExtensions');
     $autoloader->pushAutoloader(array($doctrineExtensionsAutoloader, 'loadClass'), 'DoctrineExtensions');
     $doctrineAutoloader = new \Doctrine\Common\ClassLoader('Doctrine');
     $autoloader->pushAutoloader(array($doctrineAutoloader, 'loadClass'), 'Doctrine');
 }
Example #26
Show file File: Doctrine.php Project: bardascat/blogify
0
 public function Doctrine()
 {
     require_once APPPATH . 'libraries/vendor/autoload.php';
     $doctrineClassLoader = new ClassLoader('Doctrine', APPPATH . 'libraries');
     $doctrineClassLoader->register();
     $entitiesClassLoader = new ClassLoader('BusinessLogic', rtrim(APPPATH, "/"));
     $classLoader = new \Doctrine\Common\ClassLoader('DoctrineExtensions', APPPATH . 'libraries');
     $classLoader->register();
     $entitiesClassLoader->register();
     $this->initDB();
 }
Example #27
Show file File: Doctrine.php Project: NaszvadiG/ci-beam
0
 public function __construct()
 {
     // Set up class loading. You could use different autoloaders, provided by your favorite framework,
     // if you want to.
     $directory = APPPATH . "third_party/doctrine2-orm";
     if (!class_exists('Doctrine\\ORM\\Tools\\Setup', false)) {
         require $directory . '/Doctrine/ORM/Tools/Setup.php';
     }
     Doctrine\ORM\Tools\Setup::registerAutoloadDirectory($directory);
     $doctrineClassLoader = new ClassLoader('Doctrine', APPPATH . 'libraries');
     $doctrineClassLoader->register();
     // Set up models loading
     $entitiesClassLoader = new ClassLoader('models', rtrim(APPPATH, "/"));
     $entitiesClassLoader->register();
     foreach (glob(APPPATH . 'modules/*', GLOB_ONLYDIR) as $m) {
         $module = str_replace(APPPATH . 'modules/', '', $m);
         $loader = new ClassLoader($module, APPPATH . 'modules');
         $loader->register();
     }
     $proxiesClassLoader = new ClassLoader('Proxies', APPPATH . 'models/proxies');
     $proxiesClassLoader->register();
     // Set up caches
     $this->config = new Configuration();
     $cache = new ArrayCache();
     //		$cache = new \Doctrine\Common\Cache\ApcCache;
     $this->config->setMetadataCacheImpl($cache);
     $this->config->setQueryCacheImpl($cache);
     // Set up models
     $models = array(APPPATH . 'models');
     foreach (glob(APPPATH . 'modules/*/models', GLOB_ONLYDIR) as $m) {
         array_push($models, $m);
     }
     $driverImpl = $this->config->newDefaultAnnotationDriver($models);
     $this->config->setMetadataDriverImpl($driverImpl);
     // Proxy configuration
     $this->config->setProxyDir(APPPATH . '/models/proxies');
     $this->config->setProxyNamespace('Proxies');
     // Set up logger
     //		$logger = new EchoSQLLogger;
     //		$this->config->setSQLLogger($logger);
     $this->config->setAutoGenerateProxyClasses(TRUE);
     // Database connection information
     // load database configuration from CodeIgniter
     // Is the config file in the environment folder?
     if (!defined('ENVIRONMENT') or !file_exists($file_path = APPPATH . 'config/' . ENVIRONMENT . '/database.php')) {
         if (!file_exists($file_path = APPPATH . 'config/database.php')) {
             show_error('The configuration file database.php does not exist.');
         }
     }
     include $file_path;
     if (!isset($db) or count($db) == 0) {
         show_error('No database connection settings were found in the database config file.');
     }
     $this->connectionOptions = array('driver' => 'pdo_mysql', 'user' => $db['default']['username'], 'password' => $db['default']['password'], 'host' => $db['default']['hostname'], 'dbname' => $db['default']['database']);
     // Create EntityManager
     $this->em = EntityManager::create($this->connectionOptions, $this->config);
 }
Example #28
Show file File: Doctrine.php Project: uno-de-piera/doctrine-codeigniter3
0
 public function __construct()
 {
     //cargamos la configuración de base de datos de codeigniter
     require APPPATH . "config/database.php";
     //utilizamos el namespace Entities para mapear el directorio models
     $entitiesClassLoader = new ClassLoader('Entities', rtrim(APPPATH . "models"));
     $entitiesClassLoader->register();
     //utilizamos el namespace Proxies para mapear el directorio models/proxies
     $proxiesClassLoader = new ClassLoader('Proxies', APPPATH . 'models/proxies');
     $proxiesClassLoader->register();
     // Configuración y chaché
     $config = new Configuration();
     $cache = new ArrayCache();
     $config->setMetadataCacheImpl($cache);
     $driverImpl = $config->newDefaultAnnotationDriver(array(APPPATH . 'models/entities'));
     $config->setMetadataDriverImpl($driverImpl);
     $config->setQueryCacheImpl($cache);
     $config->setQueryCacheImpl($cache);
     // Configuración Proxy
     $config->setProxyDir(APPPATH . '/models/proxies');
     $config->setProxyNamespace('Proxies');
     // Habilitar el logger para obtener información de cada proceso
     $logger = new EchoSQLLogger();
     //$config->setSQLLogger($logger);
     $config->setAutoGenerateProxyClasses(TRUE);
     //configuramos la conexión con la base de datos utilizando las credenciales de nuestra app
     $connectionOptions = array('driver' => 'pdo_mysql', 'user' => $db["default"]["username"], 'password' => $db["default"]["password"], 'host' => $db["default"]["hostname"], 'dbname' => $db["default"]["database"]);
     // Creamos el EntityManager
     $this->em = EntityManager::create($connectionOptions, $config);
 }
Example #29
Show file File: autoload_real.php Project: igortrinidad/itevento.com
0
 public static function getLoader()
 {
     if (null !== self::$loader) {
         return self::$loader;
     }
     spl_autoload_register(array('ComposerAutoloaderInit9bcc74f44ad7dcf427fffe8361aec270', 'loadClassLoader'), true, true);
     self::$loader = $loader = new \Composer\Autoload\ClassLoader();
     spl_autoload_unregister(array('ComposerAutoloaderInit9bcc74f44ad7dcf427fffe8361aec270', 'loadClassLoader'));
     $map = (require __DIR__ . '/autoload_namespaces.php');
     foreach ($map as $namespace => $path) {
         $loader->set($namespace, $path);
     }
     $map = (require __DIR__ . '/autoload_psr4.php');
     foreach ($map as $namespace => $path) {
         $loader->setPsr4($namespace, $path);
     }
     $classMap = (require __DIR__ . '/autoload_classmap.php');
     if ($classMap) {
         $loader->addClassMap($classMap);
     }
     $loader->register(true);
     $includeFiles = (require __DIR__ . '/autoload_files.php');
     foreach ($includeFiles as $fileIdentifier => $file) {
         composerRequire9bcc74f44ad7dcf427fffe8361aec270($fileIdentifier, $file);
     }
     return $loader;
 }