當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ClassLoader::removeLoader方法代碼示例

本文整理匯總了PHP中lang\ClassLoader::removeLoader方法的典型用法代碼示例。如果您正苦於以下問題:PHP ClassLoader::removeLoader方法的具體用法?PHP ClassLoader::removeLoader怎麽用?PHP ClassLoader::removeLoader使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在lang\ClassLoader的用法示例。


在下文中一共展示了ClassLoader::removeLoader方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: tearDown

 /**
  * Tear down this test. Removes classloader delegates registered 
  * during setUp()
  *
  */
 public function tearDown()
 {
     \lang\ClassLoader::removeLoader($this->libraryLoader);
     \lang\ClassLoader::removeLoader($this->containedLoader);
     \lang\ClassLoader::removeLoader($this->brokenLoader);
 }
開發者ID:melogamepay,項目名稱:xp-framework,代碼行數:11,代碼來源:ClassLoaderTest.class.php

示例2: removeClientClassLoader

 public static function removeClientClassLoader()
 {
     self::$clientClassesLoader && \lang\ClassLoader::removeLoader(self::$clientClassesLoader);
 }
開發者ID:melogamepay,項目名稱:xp-framework,代碼行數:4,代碼來源:IntegrationTest.class.php

示例3: tearDown

 /**
  * Tears down test, removing all loaders registered with the CL.
  */
 public function tearDown()
 {
     foreach ($this->registered as $l) {
         ClassLoader::removeLoader($l);
     }
 }
開發者ID:xp-framework,項目名稱:core,代碼行數:9,代碼來源:ModuleLoadingTest.class.php

示例4: tearDown

 /**
  * Removes class loader
  */
 public function tearDown()
 {
     \lang\ClassLoader::removeLoader($this->cl);
 }
開發者ID:melogamepay,項目名稱:xp-framework,代碼行數:7,代碼來源:ResourcesTest.class.php

示例5: tearDown

 /**
  * Tear down this test. Removes classloader delegates registered 
  * during setUp()
  *
  */
 public function tearDown()
 {
     \lang\ClassLoader::removeLoader($this->libraryLoader);
 }
開發者ID:melogamepay,項目名稱:xp-framework,代碼行數:9,代碼來源:PackageTest.class.php

示例6: main

 /**
  * Entry point method
  *
  * @param   string[] args
  */
 public static function main(array $args)
 {
     if (empty($args)) {
         return self::usage();
     }
     foreach (ClassLoader::getLoaders() as $loader) {
         if ($loader instanceof JitClassLoader) {
             ClassLoader::removeLoader($loader);
         }
     }
     // Set up compiler
     $compiler = new Compiler();
     $manager = new FileManager();
     $manager->setSourcePaths(\xp::$classpath);
     // Handle arguments
     $profiles = ['default'];
     $emitter = 'php5.5';
     $result = function ($success) {
         return $success ? 0 : 1;
     };
     $files = [];
     $listener = new DefaultDiagnosticListener(Console::$out);
     for ($i = 0, $s = sizeof($args); $i < $s; $i++) {
         if ('-?' === $args[$i] || '--help' === $args[$i]) {
             return self::usage();
         } else {
             if ('-cp' === $args[$i]) {
                 \lang\ClassLoader::registerPath($args[++$i]);
             } else {
                 if ('-sp' === $args[$i]) {
                     $manager->addSourcePath($args[++$i]);
                 } else {
                     if ('-v' === $args[$i]) {
                         $listener = new VerboseDiagnosticListener(Console::$out);
                     } else {
                         if ('-q' === $args[$i]) {
                             $listener = new QuietDiagnosticListener(Console::$out);
                         } else {
                             if ('-t' === $args[$i]) {
                                 $levels = LogLevel::NONE;
                                 foreach (explode(',', $args[++$i]) as $level) {
                                     $levels |= LogLevel::named($level);
                                 }
                                 $compiler->setTrace(create(new LogCategory('xcc'))->withAppender(new ConsoleAppender(), $levels));
                             } else {
                                 if ('-E' === $args[$i]) {
                                     $emitter = $args[++$i];
                                 } else {
                                     if ('-p' === $args[$i]) {
                                         $profiles = explode(',', $args[++$i]);
                                     } else {
                                         if ('-o' === $args[$i]) {
                                             $output = $args[++$i];
                                             $folder = new Folder($output);
                                             $folder->exists() || $folder->create();
                                             $manager->setOutput($folder);
                                         } else {
                                             if ('-N' === $args[$i]) {
                                                 $dir = $args[++$i];
                                                 $manager->addSourcePath($dir);
                                                 $files = array_merge($files, self::fromFolder($dir, false));
                                             } else {
                                                 if (is_dir($args[$i])) {
                                                     $dir = $args[$i];
                                                     $manager->addSourcePath($dir);
                                                     $files = array_merge($files, self::fromFolder($dir, true));
                                                 } else {
                                                     $files[] = new FileSource(new File($args[$i]));
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     // Check
     if (empty($files)) {
         Console::$err->writeLine('*** No files given (-? will show usage)');
         return 2;
     }
     // Setup emitter
     sscanf($emitter, '%[^0-9]%d.%d', $language, $major, $minor);
     try {
         $emit = \lang\XPClass::forName('xp.compiler.emit.Emitter')->cast(Package::forName('xp.compiler.emit')->getPackage($language)->loadClass(($major ? 'V' . $major . $minor : '') . 'Emitter')->newInstance());
     } catch (\lang\ClassCastException $e) {
         Console::$err->writeLine('*** Not an emitter implementation: ', $e->compoundMessage());
         return 4;
     } catch (\lang\IllegalAccessException $e) {
         Console::$err->writeLine('*** Cannot use emitter named "', $emitter, '": ', $e->compoundMessage());
         return 4;
//.........這裏部分代碼省略.........
開發者ID:xp-lang,項目名稱:compiler,代碼行數:101,代碼來源:CompileRunner.class.php


注:本文中的lang\ClassLoader::removeLoader方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。